Event onUserAfterSave

Executes after the user (or administrator) has saved their data. We need to check whether the password was changed and if so update the passwordcontrol table.

[Note]Note

Releases prior to 0.0.9 only made use of the ‘OnAfterUserSave’ event so that ‘#__passwordcontrol’ table is only updated if the passwords do not match, however by making use of this 'after' event changes to the '#__users' table may/will have already been make even if the password specified has been used previously. This does not impact the display of the password reuse checks and message displays since the user is forced back to the 'edit screen to re-supply their password.

Release 0.0.9 introduces the use of the 'before' event trigger to prevent the saving of the user supplied information to the '#__users’ if a previously used password is supplied.

  1. If this is a real user id and we have a result.

  2. Check if we have previously loaded the parameters we require into the session. If not load the few parameters we require.

  3. Check if we are interested in checking previous passwords. If not go to step 9 below.

  4. Check if the exempt users can reuse their passwords. If they can step 9 below.

  5. Check if a password change has occurred. If a password change has not occurred just return

  6. Check whether the new password is the same as any of the previously saved passwords either by calling the database routine or by calling the equivalent PHP routine.

  7. If we have already used the password before (for that user) and this is an administrator then raise an exception. Update the session variable and return

  8. If we have not used the new password before then go to step 9.

  9. Update the control table.

  10. Update session variable so that password specification is now optional.

  11. Update session variable so that email changing is not forced.

  12. Return.

Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries