X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FAuthPlugin.php;h=0b65593faf23fc30defa3e87130781620cb212b3;hb=6e65053cc9eac6d94f1c7843cb0aef5dd09b5d3f;hp=45ad4d1bd1131c6e8567fe844565f21e64c168bb;hpb=01da3da43d18b123fe3679a6af21f046a78180d5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php index 45ad4d1bd1..0b65593faf 100644 --- a/includes/AuthPlugin.php +++ b/includes/AuthPlugin.php @@ -32,6 +32,8 @@ * accounts authenticate externally, or use it only as a fallback; also * you can transparently create internal wiki accounts the first time * someone logs in who can be authenticated externally. + * + * @deprecated since 1.27 */ class AuthPlugin { /** @@ -120,6 +122,8 @@ class AuthPlugin { * The User object is passed by reference so it can be modified; don't * forget the & on your function declaration. * + * @deprecated since 1.26, use the UserLoggedIn hook instead. And assigning + * a different User object to $user is no longer supported. * @param User $user * @return bool */ @@ -155,11 +159,11 @@ class AuthPlugin { * @return bool */ public function allowPropChange( $prop = '' ) { - if ( $prop == 'realname' && is_callable( array( $this, 'allowRealNameChange' ) ) ) { + if ( $prop == 'realname' && is_callable( [ $this, 'allowRealNameChange' ] ) ) { return $this->allowRealNameChange(); - } elseif ( $prop == 'emailaddress' && is_callable( array( $this, 'allowEmailChange' ) ) ) { + } elseif ( $prop == 'emailaddress' && is_callable( [ $this, 'allowEmailChange' ] ) ) { return $this->allowEmailChange(); - } elseif ( $prop == 'nickname' && is_callable( array( $this, 'allowNickChange' ) ) ) { + } elseif ( $prop == 'nickname' && is_callable( [ $this, 'allowNickChange' ] ) ) { return $this->allowNickChange(); } else { return true; @@ -204,6 +208,7 @@ class AuthPlugin { * Update user information in the external authentication database. * Return true if successful. * + * @deprecated since 1.26, use the UserSaveSettings hook instead. * @param User $user * @return bool */ @@ -215,12 +220,13 @@ class AuthPlugin { * Update user groups in the external authentication database. * Return true if successful. * + * @deprecated since 1.26, use the UserGroupsChanged hook instead. * @param User $user * @param array $addgroups Groups to add. * @param array $delgroups Groups to remove. * @return bool */ - public function updateExternalDBGroups( $user, $addgroups, $delgroups = array() ) { + public function updateExternalDBGroups( $user, $addgroups, $delgroups = [] ) { return true; } @@ -278,6 +284,8 @@ class AuthPlugin { * The User object is passed by reference so it can be modified; don't * forget the & on your function declaration. * + * @deprecated since 1.26, use the UserLoggedIn hook instead. And assigning + * a different User object to $user is no longer supported. * @param User $user * @param bool $autocreate True if user is being autocreated on login */ @@ -312,10 +320,13 @@ class AuthPlugin { * @return array */ public function domainList() { - return array(); + return []; } } +/** + * @deprecated since 1.27 + */ class AuthPluginUser { function __construct( $user ) { # Override this! @@ -326,16 +337,29 @@ class AuthPluginUser { return -1; } + /** + * Indicate whether the user is locked + * @deprecated since 1.26, use the UserIsLocked hook instead. + * @return bool + */ public function isLocked() { # Override this! return false; } + /** + * Indicate whether the user is hidden + * @deprecated since 1.26, use the UserIsHidden hook instead. + * @return bool + */ public function isHidden() { # Override this! return false; } + /** + * @deprecated since 1.28, use SessionManager::invalidateSessionForUser() instead. + */ public function resetAuthToken() { # Override this! return true;