Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
c073716c00 | |||
40e3e4f8a7 | |||
31cf02f67b | |||
758332d635 |
12
auth.php
12
auth.php
@ -67,7 +67,7 @@ class auth_plugin_link extends auth_plugin_base {
|
||||
/**
|
||||
* No password updates.
|
||||
*/
|
||||
public function user_update_password($user, $newpassword) {
|
||||
public function user_update_password() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -134,9 +134,9 @@ class auth_plugin_link extends auth_plugin_base {
|
||||
$username = htmlspecialchars($_REQUEST['username']);
|
||||
$password = htmlspecialchars($_REQUEST['password']);
|
||||
|
||||
// User existence check
|
||||
if ($user = $DB->get_record('user', array( 'username' => $username) )) {
|
||||
// Verification of authorization data
|
||||
// User existence check.
|
||||
if ($user = $DB->get_record('user', array('username' => $username) )) {
|
||||
// Verification of authorization data.
|
||||
if (validate_internal_user_password($user, $password)) {
|
||||
complete_user_login($user);
|
||||
$this->redirect_user();
|
||||
@ -152,12 +152,12 @@ class auth_plugin_link extends auth_plugin_base {
|
||||
public function redirect_user() {
|
||||
global $CFG, $SESSION;
|
||||
|
||||
$redirect = $CFG->wwwroot;
|
||||
|
||||
if (isset($SESSION->wantsurl)) {
|
||||
$redirect = $SESSION->wantsurl;
|
||||
} else if (isset($_GET['wantsurl'])) {
|
||||
$redirect = htmlspecialchars($_GET['wantsurl']);
|
||||
} else {
|
||||
$redirect = $CFG->wwwroot;
|
||||
}
|
||||
|
||||
redirect($redirect);
|
||||
|
@ -23,8 +23,8 @@
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
$plugin->release = '0.0.1 (Build: 2017101700)';
|
||||
$plugin->version = 2017101700;
|
||||
$plugin->release = '1.0.0 (Build: 2017101701)';
|
||||
$plugin->version = 2017101701;
|
||||
$plugin->requires = 2016112900;
|
||||
$plugin->component = 'auth_link';
|
||||
$plugin->maturity = MATURITY_RC;
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
Reference in New Issue
Block a user