summaryrefslogtreecommitdiff
path: root/includes/AuthPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/AuthPlugin.php')
-rw-r--r--includes/AuthPlugin.php60
1 files changed, 31 insertions, 29 deletions
diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php
index 87ac8adb..7dc99259 100644
--- a/includes/AuthPlugin.php
+++ b/includes/AuthPlugin.php
@@ -1,23 +1,27 @@
<?php
/**
+ * Authentication plugin interface
+ *
+ * Copyright © 2004 Brion Vibber <brion@pobox.com>
+ * http://www.mediawiki.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
*/
-# Copyright (C) 2004 Brion Vibber <brion@pobox.com>
-# http://www.mediawiki.org/
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# http://www.gnu.org/copyleft/gpl.html
/**
* Authentication plugin interface. Instantiate a subclass of AuthPlugin
@@ -105,7 +109,6 @@ class AuthPlugin {
return true;
}
-
/**
* Return true if the wiki should create a new local account automatically
* when asked to login a user who doesn't exist locally but does in the
@@ -131,11 +134,11 @@ class AuthPlugin {
* @return Boolean
*/
public function allowPropChange( $prop = '' ) {
- if( $prop == 'realname' && is_callable( array( $this, 'allowRealNameChange' ) ) ) {
+ if ( $prop == 'realname' && is_callable( array( $this, 'allowRealNameChange' ) ) ) {
return $this->allowRealNameChange();
- } elseif( $prop == 'emailaddress' && is_callable( array( $this, 'allowEmailChange' ) ) ) {
+ } elseif ( $prop == 'emailaddress' && is_callable( array( $this, 'allowEmailChange' ) ) ) {
return $this->allowEmailChange();
- } elseif( $prop == 'nickname' && is_callable( array( $this, 'allowNickChange' ) ) ) {
+ } elseif ( $prop == 'nickname' && is_callable( array( $this, 'allowNickChange' ) ) ) {
return $this->allowNickChange();
} else {
return true;
@@ -197,11 +200,10 @@ class AuthPlugin {
* @param $realname String
* @return Boolean
*/
- public function addUser( $user, $password, $email='', $realname='' ) {
+ public function addUser( $user, $password, $email = '', $realname = '' ) {
return true;
}
-
/**
* Return true to prevent logins that don't authenticate here from being
* checked against the local database's password fields.
@@ -236,7 +238,7 @@ class AuthPlugin {
* @param $user User object.
* @param $autocreate Boolean: True if user is being autocreated on login
*/
- public function initUser( &$user, $autocreate=false ) {
+ public function initUser( &$user, $autocreate = false ) {
# Override this to do something.
}
@@ -247,7 +249,7 @@ class AuthPlugin {
public function getCanonicalName( $username ) {
return $username;
}
-
+
/**
* Get an instance of a User object
*
@@ -262,22 +264,22 @@ class AuthPluginUser {
function __construct( $user ) {
# Override this!
}
-
+
public function getId() {
# Override this!
return -1;
}
-
+
public function isLocked() {
# Override this!
return false;
}
-
+
public function isHidden() {
# Override this!
return false;
}
-
+
public function resetAuthToken() {
# Override this!
return true;