|
Moodle
2.2.1
http://www.collinsharper.com
|


| auth_plugin_ldap | ( | ) |
Returns true if this authentication plugin can change the user's password.
Reimplemented from auth_plugin_base.
Reimplemented in auth_plugin_cas.
| can_confirm | ( | ) |
Returns true if plugin allows confirming of new users.
Reimplemented from auth_plugin_base.
Returns true if plugin allows resetting of password from moodle.
Reimplemented from auth_plugin_base.
| can_signup | ( | ) |
Returns true if plugin allows signup and user creation.
Reimplemented from auth_plugin_base.
Returns the URL for changing the user's password, or empty if the default can be used.
Reimplemented from auth_plugin_base.
Reimplemented in auth_plugin_cas.
| config_form | ( | $ | config, |
| $ | err, | ||
| $ | user_fields | ||
| ) |
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.
| array | $page | An object containing all the data for this page. |
Reimplemented from auth_plugin_base.
Reimplemented in auth_plugin_cas.
| get_userinfo | ( | $ | username | ) |
Reads user information from ldap and returns it in array()
Function should return all information available. If you are saving this information to moodle user-table you should honor syncronization flags
| string | $username | username |
Reimplemented from auth_plugin_base.
Reimplemented in auth_plugin_cas.
Definition at line 201 of file auth.php.

| get_userinfo_asobj | ( | $ | username | ) |
| get_userlist | ( | ) |
| init_plugin | ( | $ | authtype | ) |
| is_internal | ( | ) |
Returns true if this authentication plugin is 'internal'.
Reimplemented from auth_plugin_base.
Reimplemented in auth_plugin_cas.
| iscreator | ( | $ | username | ) |
Returns true if user should be coursecreator.
| mixed | $username | username (without system magic quotes) |
Reimplemented in auth_plugin_cas.
Definition at line 996 of file auth.php.

| ldap_attributes | ( | ) |
| ldap_bulk_insert | ( | $ | username | ) |
| ldap_close | ( | ) |
| ldap_connect | ( | ) |
Connect to the LDAP server, using the plugin configured settings. It's actually a wrapper around ldap_connect_moodle()
Definition at line 1971 of file auth.php.

| ldap_expirationtime2unix | ( | $ | time, |
| $ | ldapconnection, | ||
| $ | user_dn | ||
| ) |
Take expirationtime and return it as unix timestamp in seconds
Takes expiration timestamp as read from LDAP and returns it as unix timestamp in seconds Depends on $this->config->user_type variable
| mixed | time Time stamp read from LDAP as it is. | |
| string | $ldapconnection | Only needed for Active Directory. |
| string | $user_dn | User distinguished name for the user we are checking password expiration (only needed for Active Directory). |
Definition at line 1326 of file auth.php.

| ldap_find_userdn | ( | $ | ldapconnection, |
| $ | extusername | ||
| ) |
Search specified contexts for username and return the user dn like: cn=username,ou=suborg,o=org. It's actually a wrapper around ldap_find_userdn().
| resource | $ldapconnection | a valid LDAP connection |
| string | $extusername | the username to search (in external LDAP encoding, no db slashes) |
Definition at line 2015 of file auth.php.


| ldap_get_ad_pwdexpire | ( | $ | pwdlastset, |
| $ | ldapconn, | ||
| $ | user_dn | ||
| ) |
Get password expiration time for a given user from Active Directory
| string | $pwdlastset | The time last time we changed the password. |
| resource | $lcapconn | The open LDAP connection. |
| string | $user_dn | The distinguished name of the user we are checking. |
Definition at line 1838 of file auth.php.

| ldap_get_userlist | ( | $ | filter = '*' | ) |
| ldap_unix2expirationtime | ( | $ | time | ) |
| loginpage_hook | ( | ) |
Will get called before the login page is shownr. Ff NTLM SSO is enabled, and the user is in the right network, we'll redirect to the magic NTLM page for SSO...
Reimplemented from auth_plugin_base.
Reimplemented in auth_plugin_cas.
Definition at line 1498 of file auth.php.

| ntlmsso_finish | ( | ) |
Find the session set by ntlmsso_magic(), validate it and call authenticate_user_login() to authenticate the user through the auth machinery.
It is complemented by a similar check in user_login().
If it succeeds, it never returns.
Definition at line 1612 of file auth.php.

| ntlmsso_magic | ( | $ | sesskey | ) |
To be called from a page running under NTLM's "Integrated Windows Authentication".
If successful, it will set a special "cookie" (not an HTTP cookie!) in cache_flags under the $this->pluginconfig/ntlmsess "plugin" and return true. The "cookie" will be picked up by ntlmsso_finish() to complete the process.
On failure it will return false for the caller to display an appropriate error message (probably saying that Integrated Windows Auth isn't enabled!)
NOTE that this code will execute under the OS user credentials, so we MUST avoid dealing with files -- such as session files. (The caller should define('NO_MOODLE_COOKIES', true) before including config.php)
Definition at line 1571 of file auth.php.

| password_expire | ( | $ | username | ) |
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.
| mixed | $username | username |
Reimplemented from auth_plugin_base.
Definition at line 570 of file auth.php.

Indicates if password hashes should be stored in local moodle database.
Reimplemented from auth_plugin_base.
Reimplemented in auth_plugin_cas.
| process_config | ( | $ | config | ) |
Processes and stores configuration data for this authentication plugin.
Reimplemented from auth_plugin_base.
Reimplemented in auth_plugin_cas.
Definition at line 1697 of file auth.php.

| sync_roles | ( | $ | user | ) |
Sync roles for this user
| $user | object user object (without system magic quotes) |
Reimplemented from auth_plugin_base.
Definition at line 1656 of file auth.php.

| sync_users | ( | $ | do_updates = true | ) |
Syncronizes user fron external LDAP server to moodle user table
Sync is now using username attribute.
Syncing users removes or suspends users that dont exists anymore in external LDAP. Creates new users and updates coursecreator status of users.
| bool | $do_updates | will do pull in data updates from LDAP if relevant |
Define table user to be created
preserve our user database if the temp table is empty, it probably means that something went wrong, exit so as to avoid mass deletion of users; which is hard to undo
User removal
Revive suspended users
User Updates - time-consuming (optional)
User Additions
Reimplemented in auth_plugin_cas.
Definition at line 613 of file auth.php.

| update_user_record | ( | $ | username, |
| $ | updatekeys = false |
||
| ) |
Update a local user record from an external source. This is a lighter version of the one in moodlelib -- won't do expensive ops such as enrolment.
If you don't pass $updatekeys, there is a performance hit and values removed from LDAP won't be removed from moodle.
| string | $username | username |
| boolean | $updatekeys | true to update the local record with the external LDAP values. |
Definition at line 888 of file auth.php.

| user_activate | ( | $ | username | ) |
| user_confirm | ( | $ | username, |
| $ | confirmsecret | ||
| ) |
Confirm the new user as registered.
| string | $username | |
| string | $confirmsecret |
Reimplemented from auth_plugin_base.
Definition at line 536 of file auth.php.

| user_create | ( | $ | userobject, |
| $ | plainpass | ||
| ) |
| user_exists | ( | $ | username | ) |
Checks if user exists on LDAP
| string | $username |
Reimplemented from auth_plugin_base.
Definition at line 300 of file auth.php.

| user_login | ( | $ | username, |
| $ | password | ||
| ) |
Returns true if the username and password work and false if they are wrong or don't exist.
| string | $username | The username (without system magic quotes) |
| string | $password | The password (without system magic quotes) |
Reimplemented from auth_plugin_base.
Reimplemented in auth_plugin_cas.
Definition at line 126 of file auth.php.

| user_signup | ( | $ | user, |
| $ | notify = true |
||
| ) |
Sign up a new user ready for confirmation. Password is passed in plaintext.
| object | $user | new user object |
| boolean | $notify | print notice with link and terminate |
Reimplemented from auth_plugin_base.
Definition at line 477 of file auth.php.

| user_update | ( | $ | olduser, |
| $ | newuser | ||
| ) |
Called when the user record is updated.
Modifies user in external LDAP server. It takes olduser (before changes) and newuser (after changes) compares information and saves modified information to external LDAP server.
| mixed | $olduser | Userobject before modifications (without system magic quotes) |
| mixed | $newuser | Userobject new modified userobject (without system magic quotes) |
Reimplemented from auth_plugin_base.
| user_update_password | ( | $ | user, |
| $ | newpassword | ||
| ) |
Changes userpassword in LDAP
Called when the user password is updated. It assumes it is called by an admin or that you've otherwise checked the user's credentials
| object | $user | User table object |
| string | $newpassword | Plaintext password (not crypted/md5'ed) |
Reimplemented from auth_plugin_base.
Definition at line 1207 of file auth.php.
