I recently made some changes to the user notification messaging in Redux. WordPress’ default configuration sends the user a message after the register with their credentials, including a system assigned password. Register Plus followed this up with letting users assign their own password, and a choice of using the default message or a custom message, either way the message went immediately after the user registered. One user on the register plus forum mentioned the potential privacy problem with sending the user their password when it is not system assigned.
My approach to the user message is a bit more sophisticated. With the least configuration, that is, no custom message, and no email or admin verification, the user will get the default WordPress message with their system assigned password, that message can be easily modified using the custom message option. When email verification is enabled, the user is sent a simple message with the verification code and nothing else. Once they have verified their email address they would then get either the default or custom message. Finally, if admin verification is enabled, the user will get no message until the admin authorizes the user, at which point they will then get either the default or custom message. In regard to the privacy issue mentioned previously, I would suggest to that user that they create a custom message that does not include the %user_password% keyword. To make things easier, the default custom message now mirrors the default message, and I added a restore default message button.
To further complicate matters, or possibly make things simpler, glass half full or not, I removed the exclusivity between email/admin verification. If both are enabled, the user will receive a verification code, and their account will be flagged in the administration panel as pending email verification. At this point the admin may choose to approve the user before the user completed email verification, or wait for the user’s status to change to email verified. Another nicety, or complexity, is when email verification is not enabled, the user will be flagged as email not verified. The administrator may choose to approve the user, or manually send them a verification code, at which point their status would be changed to pending verification.
The code behind all this is pretty simple. Previously depending on what verification was enabled, the user’s requested username was stored as either email_verification_user_login, or admin_verification_user_login. I now store the requested username as stored_user_login, and depending on whether their is an issued email_verification_code or not we can determine whether they are pending email verification or not, also, there is an added field for email_verification_date to determine whether the user has successfully verified their email address or not, this is especially useful when both verification processes are enabled.
Another process I modified following these changes was the user purge that is run each time the admin logs in. Previously only users pending email verification were purged, I’ve changed the default behavior to purge users pending either verification with no update with the specified “grace” period. For example, if the grace period were 7 days and both verification processes were enabled. If it took six days for the user to register their email address, they reset the clock so to speak, if seven days later the admin still had not approved them, then they would be purged. I added an option to modify this behavior, you can choose to only purge users pending email verification outside the grace period. I added another option to send the user a notification that their account was purged via automatic process, with a sub option to notify only users pending email verification either or admin verification. Again more complexity, but more granularity.
All the changes I have been making have me considered giving Redux it’s own category on the admin menu with pages for different features. I don’t want the settings page to be a mile long, but I don’t want the menu to be either. Any feedback would be appreciated, I could go nuts and make that a setting too! Oi, settings upon settings upon settings. I hope this clarifies things for anyone interested, I wish I knew how to express this even simpler, maybe I should start making some flowcharts!
Questions, comments, and concerns are always welcome, thank you for reading and for using Register Plus Redux!
PS, many of these administration options will not be available until 3.6.12.