| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Source view] [Print] [Project Stats]
(no description)
| Author: | Martin Dougiamas |
| License: | http://www.gnu.org/copyleft/gpl.html GNU Public License |
| File Size: | 380 lines (11 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
auth_plugin_base:: (26 methods):
user_login()
can_change_password()
change_password_url()
is_internal()
user_update_password()
user_update()
user_delete()
can_reset_password()
can_signup()
user_signup()
can_confirm()
user_confirm()
user_exists()
password_expire()
sync_roles()
get_userinfo()
config_form()
validate_form()
process_config()
loginpage_hook()
user_authenticated_hook()
prelogout_hook()
logoutpage_hook()
get_title()
get_description()
is_captcha_enabled()
Class: auth_plugin_base - X-Ref
Abstract authentication plugin.| user_login($username, $password) X-Ref |
| This is the primary method that is used by the authenticate_user_login() function in moodlelib.php. This method should return a boolean indicating whether or not the username and password authenticate successfully. Returns true if the username and password work and false if they are wrong or don't exist. param: string $username The username (with system magic quotes) param: string $password The password (with system magic quotes) return: bool Authentication success or failure. |
| can_change_password() X-Ref |
| Returns true if this authentication plugin can change the users' password. return: bool |
| change_password_url() X-Ref |
| Returns the URL for changing the users' passwords, or empty if the default URL can be used. This method is used if can_change_password() returns true. This method is called only when user is logged in, it may use global $USER. return: string |
| is_internal() X-Ref |
| Returns true if this authentication plugin is "internal" (which means that Moodle stores the users' passwords and other details in the local Moodle database). return: bool |
| user_update_password($user, $newpassword) X-Ref |
| Updates the user's password. In previous versions of Moodle, the function auth_user_update_password accepted a username as the first parameter. The revised function expects a user object. param: object $user User table object (with system magic quotes) param: string $newpassword Plaintext password (with system magic quotes) return: bool True on success |
| user_update($olduser, $newuser) X-Ref |
| Called when the user record is updated. Modifies user in external database. It takes olduser (before changes) and newuser (after changes) conpares information saved modified information to external db. param: mixed $olduser Userobject before modifications (without system magic quotes) param: mixed $newuser Userobject new modified userobject (without system magic quotes) return: boolean true if updated or update ignored; false if error |
| user_delete($olduser) X-Ref |
| User delete requested - internal user record is mared as deleted already, username not present anymore. Do any action in external database. param: object $user Userobject before delete (without system magic quotes) |
| can_reset_password() X-Ref |
| Returns true if plugin allows resetting of internal password. return: bool |
| can_signup() X-Ref |
| Returns true if plugin allows resetting of internal password. return: bool |
| user_signup($user, $notify=true) X-Ref |
| Sign up a new user ready for confirmation. Password is passed in plaintext. param: object $user new user object (with system magic quotes) param: boolean $notify print notice with link and terminate |
| can_confirm() X-Ref |
| Returns true if plugin allows confirming of new users. return: bool |
| user_confirm($username, $confirmsecret) X-Ref |
| Confirm the new user as registered. param: string $username (with system magic quotes) param: string $confirmsecret (with system magic quotes) |
| user_exists() X-Ref |
| Checks if user exists in external db param: string $username (with system magic quotes) return: bool |
| password_expire($username) X-Ref |
| return number of days to user password expires If userpassword does not expire it should return 0. If password is already expired it should return negative value. param: mixed $username username (with system magic quotes) return: integer |
| sync_roles($user) X-Ref |
| Sync roles for this user - usually creator param: $user object user object (without system magic quotes) |
| get_userinfo($username) X-Ref |
| Read user information from external database and returns it as array(). Function should return all information available. If you are saving this information to moodle user-table you should honor syncronization flags param: string $username username (with system magic quotes) return: mixed array with no magic quotes or false on error |
| config_form($config, $err, $user_fields) X-Ref |
| Prints a form for configuring this authentication plugin. This function is called from admin/auth.php, and outputs a full page with a form for configuring this plugin. |
| validate_form(&$form, &$err) X-Ref |
| A chance to validate form data, and last chance to do stuff before it is inserted in config_plugin param: object object with submitted configuration settings (without system magic quotes) param: array $err array of error messages |
| process_config($config) X-Ref |
| Processes and stores configuration data for this authentication plugin. param: object object with submitted configuration settings (without system magic quotes) |
| loginpage_hook() X-Ref |
| Hook for overriding behavior of login page. This method is called from login/index.php page for all enabled auth plugins. |
| user_authenticated_hook(&$user, $username, $password) X-Ref |
| Post authentication hook. This method is called from authenticate_user_login() for all enabled auth plugins. param: object $user user object, later used for $USER param: string $username (with system magic quotes) param: string $password plain text password (with system magic quotes) |
| prelogout_hook() X-Ref |
| Pre logout hook. This method is called from require_logout() for all enabled auth plugins, |
| logoutpage_hook() X-Ref |
| Hook for overriding behavior of logout page. This method is called from login/logout.php page for all enabled auth plugins. |
| get_title() X-Ref |
| Return the properly translated human-friendly title of this auth plugin |
| get_description() X-Ref |
| Get the auth description (from core or own auth lang files) |
| is_captcha_enabled() X-Ref |
| Returns whether or not the captcha element is enabled, and the admin settings fulfil its requirements. return: bool |
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |