0

I am working on a membership site and using restrict content pro and I need to allow the creation of student access users. This user will only have a username and password so for privacy reasons there will be no identifying data in the database.

I have come up with a solution by hiding the email input field and using the username to create an email address by appending my domain onto it. The user never sees the email address and it is not used for anything (lost password won’t work). The email is essentially the same as the username and satisfies the requirement for an email address by the plugin.

I restricted the username input to just letters and numbers and altered an error message that indicated the email was already in use to the username was in use.

It all seems to work.

My question is, how bad of an idea is this? Am I missing something huge?

Thanks

0

Hard to canonically answer, but as long as you haven't made the inputs and error message inaccessible to assistive technology, the only issue I foresee is what happens when someone tries to reset a password or needs to access any other system-generated email. With fake email addresses, the users will never be able to receive a password reset email and thus will have to have another way to reset the password.

Perhaps you could use some other method such as accepting their real email address upon registration, but putting them in an approval queue. An admin (or maybe it would be possible to automate?) would then set up an email address for that user that would just include the user ID, and that email address on the site's domain would be set up to forward to their actual email address. Once the new email address was set up, WP would have no record of their actual email address, so you'd have that info briefly but never for long periods of time.

1
  • Sounds about right, I don’t expect the student access credentials to receive any system generated email as the account is for multiple users. It would be up to the group owner to reset the student access credentials .
    – Pond
    Apr 27 '20 at 4:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.