dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(bug 43184) bogus script path in Special:Version
[lhc/web/wiklou.git]
/
includes
/
AuthPlugin.php
diff --git
a/includes/AuthPlugin.php
b/includes/AuthPlugin.php
index
fd0624a
..
2e42439
100644
(file)
--- a/
includes/AuthPlugin.php
+++ b/
includes/AuthPlugin.php
@@
-34,6
+34,12
@@
* someone logs in who can be authenticated externally.
*/
class AuthPlugin {
* 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
/**
* Check whether there exists a user account with the given name.
* The name will be normalized to MediaWiki's requirements, so
@@
-83,6
+89,19
@@
class AuthPlugin {
$this->domain = $domain;
}
$this->domain = $domain;
}
+ /**
+ * 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.
*
/**
* Check to see if the specific domain is a valid domain.
*
@@
-103,6
+122,7
@@
class AuthPlugin {
* forget the & on your function declaration.
*
* @param $user User object
* forget the & on your function declaration.
*
* @param $user User object
+ * @return bool
*/
public function updateUser( &$user ) {
# Override this and do something
*/
public function updateUser( &$user ) {
# Override this and do something
@@
-156,6
+176,15
@@
class AuthPlugin {
return true;
}
return true;
}
+ /**
+ * Should MediaWiki store passwords in its local database?
+ *
+ * @return bool
+ */
+ public function allowSetLocalPassword() {
+ return true;
+ }
+
/**
* Set the given password in the authentication database.
* As a special case, the password may be set to null to request
/**
* Set the given password in the authentication database.
* As a special case, the password may be set to null to request
@@
-247,6
+276,8
@@
class AuthPlugin {
/**
* If you want to munge the case of an account name before the final
* check, now is your chance.
/**
* 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;
*/
public function getCanonicalName( $username ) {
return $username;
@@
-262,6
+293,15
@@
class AuthPlugin {
public function getUserInstance( User &$user ) {
return new AuthPluginUser( $user );
}
public function getUserInstance( User &$user ) {
return new AuthPluginUser( $user );
}
+
+ /**
+ * Get a list of domains (in HTMLForm options format) used.
+ *
+ * @return array
+ */
+ public function domainList() {
+ return array();
+ }
}
class AuthPluginUser {
}
class AuthPluginUser {