Events
Event are function that triggered when specific function in DX Auth library is called. To use these event you need to open 'libraries/DX_Auth_Event.php', and put your code there.
Here is the events that you can use in DX Auth library.
user_activated($user_id)
If 'DX_email_activation' in config is TRUE, this event occurs right after user succesfully activated using specified key in their email.
If 'DX_email_activation' in config is FALSE, this event occurs right after user succesfully registered.
$user_id is id of user that activated.
By default, there is codes here to create user profile. If you don't need user profile, you can delete the codes.
user_logged_in($user_id)
This event occurs right after user login. $user_id is id of user that login.
user_logging_out($user_id)
This event occurs right before user logout. $user_id is id of user that logout.
user_changed_password($user_id, $new_password)
This event occurs right after user change password. $user_id is id of user that change password, $new_password is the new password.
user_canceling_account($user_id)
This event occurs right before user account is canceled. $user_id is id of user that cancel his account.
By default, there is codes here to delete user profile. If you don't need user profile, you can delete the codes.
checked_uri_permissions($user_id, &$allowed)
This event occurs when check_uri_permissions() function in DX_Auth is called, after checking if user role is allowed or not to access URI, this event will be triggered.
$allowed is result of the check before, it's possible to alter the value since it's passed by reference.
got_permission_value($user_id, $key)
This event occurs when get_permission_value() function in DX_Auth is called.
got_permissions_value($user_id, $key)
This event occurs when get_permissions_value() function in DX_Auth is called.
sending_account_email($data, &$content)
This event occurs right before dx auth send email with account details.
$data is an array, containing username, password, email, and last_ip.
$content is email content, passed by reference.
By default there is example code how to create content here. You can change it to fit your needs.
sending_activation_email($data, &$content)
This event occurs right before dx auth send activation email.
$data is an array, containing username, password, email, last_ip, activation_key, activate_url.
$content is email content, passed by reference.
By default there is example code how to create content here. You can change it to fit your needs.
sending_forgot_password_email($data, &$content)
This event occurs right before dx auth send forgot password request email.
$data is an array, containing password, key, and reset_password_uri.
$content is email content, passed by reference.
By default there is example code how to create content here. You can change it to fit your needs.