aboutsummaryrefslogtreecommitdiff
path: root/auth.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2017-10-17 09:46:17 +0300
committerValentin Popov <info@valentineus.link>2017-10-17 09:46:17 +0300
commit782300e0cbbb7384dcb78d207c4bac63b35c1589 (patch)
treef06a456d86e6ee886e171d119d82498bf04d7005 /auth.php
parent1c9718fe9d842a042dbd53e6b1f67a0977372d54 (diff)
downloadauth_link-782300e0cbbb7384dcb78d207c4bac63b35c1589.tar.xz
auth_link-782300e0cbbb7384dcb78d207c4bac63b35c1589.zip
Control the zone of visibility methods
Diffstat (limited to 'auth.php')
-rw-r--r--auth.php24
1 files changed, 11 insertions, 13 deletions
diff --git a/auth.php b/auth.php
index f9c0ed0..ace1338 100644
--- a/auth.php
+++ b/auth.php
@@ -54,7 +54,7 @@ class auth_plugin_link extends auth_plugin_base {
* @param string $password The password
* @return bool Authentication success or failure.
*/
- function user_login($username, $password) {
+ public function user_login($username, $password) {
global $CFG, $DB;
if ($user = $DB->get_record('user', array('username' => $username, 'mnethostid' => $CFG->mnet_localhost_id))) {
@@ -67,12 +67,11 @@ class auth_plugin_link extends auth_plugin_base {
/**
* No password updates.
*/
- function user_update_password($user, $newpassword) {
+ public function user_update_password($user, $newpassword) {
return false;
}
- function prevent_local_passwords() {
- // just in case, we do not want to loose the passwords
+ public function prevent_local_passwords() {
return false;
}
@@ -80,15 +79,14 @@ class auth_plugin_link extends auth_plugin_base {
* Returns true if this authentication plugin is 'internal'.
* @return bool
*/
- function is_internal() {
- // we do not know if it was internal or external originally
+ public function is_internal() {
return true;
}
/**
* No changing of password.
*/
- function can_change_password() {
+ public function can_change_password() {
return false;
}
@@ -97,14 +95,14 @@ class auth_plugin_link extends auth_plugin_base {
* be used.
* @return moodle_url
*/
- function change_password_url() {
+ public function change_password_url() {
return null;
}
/**
* No password resetting.
*/
- function can_reset_password() {
+ public function can_reset_password() {
return true;
}
@@ -112,21 +110,21 @@ class auth_plugin_link extends auth_plugin_base {
* Returns true if plugin can be manually set.
* @return bool
*/
- function can_be_manually_set() {
+ public function can_be_manually_set() {
return true;
}
/**
* Hook for overriding behaviour before going to the login page.
*/
- function pre_loginpage_hook() {
+ public function pre_loginpage_hook() {
$this->loginpage_hook();
}
/**
* Hook for overriding behaviour of login page.
*/
- function loginpage_hook() {
+ public function loginpage_hook() {
global $DB;
if (!isloggedin()) {
@@ -151,7 +149,7 @@ class auth_plugin_link extends auth_plugin_base {
/**
* Redirect client to the original target.
*/
- function redirect_user() {
+ public function redirect_user() {
global $CFG, $SESSION;
if (isset($SESSION->wantsurl)) {