MDL-51685 unittest: Test functionality individually
[moodle.git] / auth / upgrade.txt
blob0024b81aad9f568930d3455cd386da084b7b46fc
1 This files describes API changes in /auth/* - plugins,
2 information provided here is intended especially for developers.
4 === 3.0 ===
6 * login_signup_form::signup_captcha_enabled() now calls is_captcha_enabled() from the current auth plugin instead of from auth_email
8 === 2.9 ===
10 * Do not update user->firstaccess from any auth plugin, the complete_user_login() does it automatically.
12 * Add user_add_password_history() to user_signup() method.
14 * New auth hook - pre_loginpage_hook() - available, triggered before redirecting to the login page.
16 === 2.8 ===
18 * \core\session\manager::session_exists() now verifies the session is active
19   instead of only checking the session data is present in low level session handler
21 * MNet is no longer sending logs between the client and parent sites. auth_plugin_mnet::refresh_log() is now deprecated. There is
22   no alternative. Please don't use this function.
24 === 2.7 ===
26 * If you are returning a url in method change_password_url() from config, please make sure it is set before trying to use it.
28 === 2.6 ===
30 * can_be_manually_set() - This function was introduced in the base class and returns false by default. If overriden by
31   an authentication plugin to return true, the authentication plugin will be able to be manually set for users. For example,
32   when bulk uploading users you will be able to select it as the authentication method they use.
34 === 2.4 ===
36 required changes in code:
37 * use role_get_name() or role_fix_names() if you need any role names, using role.name
38   directly from database is not correct any more
40 optional - no changes needed:
41 * add support for custom user signup form - see auth_plugin_base::signup_form() function
43 === 2.2 ===
45 required changes in code:
46 * the correct sequence to set up global $USER is:
47     $user = get_complete_user_data('username', $username); // or $user = authenticate_user_login()
48     enrol_check_plugins($user);
49     session_set_user($user);