4 Commits

Author SHA1 Message Date
c073716c00 Release of the version 1.0.0 2017-10-17 12:20:53 +04:00
40e3e4f8a7 Fix from Codacy 2017-10-17 12:15:39 +04:00
31cf02f67b Fix PHP Mess Detector 2017-10-17 12:07:59 +04:00
758332d635 Fix Moodle Code Checker 2017-10-17 12:05:25 +04:00
2 changed files with 9 additions and 9 deletions

View File

@ -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);

View File

@ -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;