How to apply discount for registered users

I have to build a learning platform where users can buy courses. I have decided to use LearnDash. But a unique scenario here is that I have to apply a 20% discount on the course price if the user registers as a member. I am using Memberpress for members’ management. A similar plugin "Conditional Discounts" is available for WooCommerce, but how can I do this for LearnDash? Any idea?

Making S3 objects viewable only for logged in users

As a service provider, I allow logged in users to upload documents to a web server, and upload it to S3. The logged in user should subsequently be able to view his own documents, and I want to serve it directly from S3, with some token-based authentication per request.

I thought that this was a pretty simple and standard use case for S3, but I am unable to find a standard way to this.

Does S3 effectively support per request authentication at object level, and what is the "correct" or "standard" way to do this.

I have read some documentation for STS, but am not able to find a clear way to solve this.

Pre signed urls almost works; the only difficulty is that that it seems to only work with a pre-set expiration time, and "logout" is not supported.

What are the rules around challenge ratings for magic users and spell?

I know that different types of creature have there own challenge ratings and that different versions of the same creature also have. But what are the rules around determining NPC enemy magic user challenge ratings and do the spells I equip them with impact that rating. For instance a level 4 sorceror armed with damage causing spells vs the same sorceror with a more varied spell list some of which won’t be relevant in the combat?

I am looking for Either any specific guidelines or rules that are provided. Or proven “Home brew” rules DMs use consistently.

How to protect IP-sensitive data in files generated and used by users

I’m working on an offline windows application that generates and loads key results as files. However, these files provide key insights into how our product works internally. To make matters worse my users will for sure be tech-savvy but not hacker like tech-savvy. So if I do not encode it, we give away our magic. So given this problem, I have some questions:

  • Is there an encryption method commonly used to make files unreadable (or at least hard to read) except for (multiple instances of) a certain application?
  • How hard is it to read what assets (like private keys) are baked into a .dll file?

Removing focus ring for non-tab users (vanilla JS to jQuery conversion)

I’m working on an accessibility issue for a client with Genesis Theme on WordPress and some custom jQuery. They need to remove the onFocus indicator border for mouse users, while leaving it intact for tab users. The following JS was suggested on Medium:

function handleFirstTab(e) {          if (e.keyCode === 9) { // the "I am a keyboard user" key         document.body.classList.add('user-is-tabbing');          window.removeEventListener('keydown', handleFirstTab);    }}  window.addEventListener('keydown', handleFirstTab); 

What might this look like if implemented in JQuery instead? For more context see:

How to change another users session with php [closed]

I am going to explain this with an example Jake and Kevin own a company called facebook, they want a means of advertisement so they create an account named facebook and immediately after creating it both of them login to the account and start advertising, later Jake wanted to change the name of their company to stackoverflow so he went to the settings and did just that, problem now is that on jakes laptop the name is stackoverflow but on kevin’s laptop the name is facebook How can i make it that at the point of submission my php script checks if the user name for anyother session is facebook and change it to stackoverflow

How to hide WordPress users’ names externally?

I have several users creating posts in WordPress, but I don’t want any of their names to appear publicly. On the site, I want it to only say By: Website Editor.

This also means that the names should not appear in any other related URLs, for example author URLs. If someone were to visit for example, it should not reveal any names. I don’t mind disabling author URLs completely if that’s easier to do.

The SEO plugin I use also shows the name of the author in the source, that’s gotta go away also.

And in the backend, the names should appear just like usual.

How could I achieve this?


Will Users of Intermediate CA1 trust Users of intermediate CA2?

I have my own CA(CA) and 2 intermediate(ICA1 & ICA2) CA’s(generated using the root CA).

Using ICA1, generated a server cert(for server S1) and 2 user cert(for user U1 & U2).

Now, user certs is distributed to the user-U1 & U2(including chain trust ICA1 & CA) and they are able to successfully connect to S1.

Similarly using ICA2, generated a server cert(for server S2) and 2 user cert(for user U3 & U4).

Now, user certs is distributed to the user-U3 & U4(including chain trust ICA2 & CA) and they are able to successfully connect to S2.

Since the chain trust is distributed and both have same root CA. Can User – U1, U2 connect to S2 and User – U3, U4 connect to S1 ?

If they can, I want that User U1 and U2 can’t connect to S2 and User U3, U4 can’t connect to S1.