Usage: This hook is started before checking for a valid SMF user on login. This gives the integrated application a chance to use the login credentials before SMF does. Something to keep in mind is that SMF hashes the password in SHA1 on the client side, so an unhashed password is not available to this function.

A value of true or false returned from the function will continue as normal, and a value of 'retry' will redisplay the login form, with the message "Password security has recently been upgraded. Please login again."

Example of use: A user that exists in the integrated application but not in SMF is attempting to login, so needs to ber migrated to SMF before SMF has a chance to authenticate. Something to keep in mind here is that SMF can authenticate with many other types of hashes, so the hashed passwords of other systems can typically be written directly to the SMF members table, with the hook returning 'retry', which will automatically invoke SMF to rewrite to its own hash on the second login attempt.

Usage: This hook is started after authentication in SMF, but before setting the SMF cookie. It's main use is setting the login cookie of an alternative system. Because the user is already authenticated in SMF at this point, there is very little need for further authentication checks.

Example of use: A user has logged into SMF, and should also be logged into the integrated system at the same time.

Usage: This hook is started before the user entry is deleted from the SMF log online table, and the SMF cookie is dropped.

Example of use: A user has logged out of SMF, and should also be logged out of the integrated system at the same time.

Orstio:
Used in file: ManageMembers.php, Profile.phpUsed in function: AdminApprove, saveProfileChanges

Variables passed to hook function: The username of the user to be changedVariables expected from hook function: None

Usage: This hook is started in two instances. Whenever the administrator approves members, each of those members' usernames is passed to the hook function for activation in the integrated system as well. The first instance is in the SMF admin panel, and the second is in the user profile.

Example of use: A user has registered, and is awaiting admin approval of his account to use both SMF and the integrated application.