77 lines
2.1 KiB
Plaintext
77 lines
2.1 KiB
Plaintext
<?php
|
|
/**
|
|
* Passwd Hooks configuration file.
|
|
*
|
|
* THE HOOKS PROVIDED IN THIS FILE ARE EXAMPLES ONLY. DO NOT ENABLE THEM
|
|
* BLINDLY IF YOU DO NOT KNOW WHAT YOU ARE DOING. YOU HAVE TO CUSTOMIZE THEM
|
|
* TO MATCH YOUR SPECIFIC NEEDS AND SYSTEM ENVIRONMENT.
|
|
*
|
|
* For more information please see the horde/config/hooks.php.dist file.
|
|
*
|
|
* $Id: 1abd981e2f1777e3f5574e995cbb438f4ea264d8 $
|
|
*/
|
|
class Passwd_Hooks
|
|
{
|
|
/**
|
|
* Username -> backend userid mapping hook.
|
|
*
|
|
* @param string $userid The username as input by user.
|
|
* @param Passwd_Driver $driver The driver object.
|
|
*
|
|
* @return string The username in the backend.
|
|
*/
|
|
// public function username($userid, $driver)
|
|
// {
|
|
// // Example: Translate what the user enters, in the username box,
|
|
// // into what the backend expects.
|
|
// if ($driver instanceof Passwd_Driver_Http) {
|
|
// return $userid . '@example.com';
|
|
// }
|
|
//
|
|
// return $userid;
|
|
// }
|
|
|
|
|
|
/**
|
|
* Userdn hook.
|
|
*
|
|
* @param string $authid The authenticated username.
|
|
*
|
|
* @return string Userdn to use.
|
|
*/
|
|
// public function userdn($authid)
|
|
// {
|
|
// // Example: Provide LDAP server with a userdn so that you do not
|
|
// // have to perform anonymous binds.
|
|
// return 'uid=' . $authid . ',o=example.com';
|
|
// }
|
|
|
|
|
|
/**
|
|
* Default username hook.
|
|
*
|
|
* @return string Return the username to use in the form.
|
|
*/
|
|
// public function default_username()
|
|
// {
|
|
// // Example: This is the default value if this hook is not defined.
|
|
// return $GLOBALS['registry']->getAuth();
|
|
// }
|
|
|
|
|
|
/**
|
|
* Hook called after the password has changed. If the password change
|
|
* affects the current Horde session, this has NOT yet been handled by
|
|
* the calling code.
|
|
*
|
|
* @param string $user The user ID.
|
|
* @param string $oldpass The old password.
|
|
* @param string $newpass The new password.
|
|
*/
|
|
// public function password_changed($user, $oldpass, $newpass)
|
|
// {
|
|
// Horde::log(sprintf('User %s has changed his password.', $user), 'NOTICE');
|
|
// }
|
|
|
|
}
|