summaryrefslogtreecommitdiff
path: root/includes/AuthPlugin.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
commit63601400e476c6cf43d985f3e7b9864681695ed4 (patch)
treef7846203a952e38aaf66989d0a4702779f549962 /includes/AuthPlugin.php
parent8ff01378c9e0207f9169b81966a51def645b6a51 (diff)
Update to MediaWiki 1.20.2
this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'includes/AuthPlugin.php')
-rw-r--r--includes/AuthPlugin.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php
index e8bab859..2e42439c 100644
--- a/includes/AuthPlugin.php
+++ b/includes/AuthPlugin.php
@@ -34,6 +34,12 @@
* someone logs in who can be authenticated externally.
*/
class AuthPlugin {
+
+ /**
+ * @var string
+ */
+ protected $domain;
+
/**
* Check whether there exists a user account with the given name.
* The name will be normalized to MediaWiki's requirements, so
@@ -84,6 +90,19 @@ class AuthPlugin {
}
/**
+ * Get the user's domain
+ *
+ * @return string
+ */
+ public function getDomain() {
+ if ( isset( $this->domain ) ) {
+ return $this->domain;
+ } else {
+ return 'invaliddomain';
+ }
+ }
+
+ /**
* Check to see if the specific domain is a valid domain.
*
* @param $domain String: authentication domain.
@@ -103,6 +122,7 @@ class AuthPlugin {
* forget the & on your function declaration.
*
* @param $user User object
+ * @return bool
*/
public function updateUser( &$user ) {
# Override this and do something
@@ -256,6 +276,8 @@ class AuthPlugin {
/**
* If you want to munge the case of an account name before the final
* check, now is your chance.
+ * @param $username string
+ * @return string
*/
public function getCanonicalName( $username ) {
return $username;