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
Merge "Don't create Language objects during ResourceLoader tests"
[lhc/web/wiklou.git]
/
includes
/
User.php
diff --git
a/includes/User.php
b/includes/User.php
index
0066a3e
..
34af4c5
100644
(file)
--- a/
includes/User.php
+++ b/
includes/User.php
@@
-58,6
+58,12
@@
class User implements IDBAccessObject {
*/
const MAX_WATCHED_ITEMS_CACHE = 100;
*/
const MAX_WATCHED_ITEMS_CACHE = 100;
+ /**
+ * Exclude user options that are set to their default value.
+ * @since 1.25
+ */
+ const GETOPTIONS_EXCLUDE_DEFAULTS = 1;
+
/**
* @var PasswordFactory Lazily loaded factory object for passwords
*/
/**
* @var PasswordFactory Lazily loaded factory object for passwords
*/
@@
-112,6
+118,7
@@
class User implements IDBAccessObject {
'deletelogentry',
'deleterevision',
'edit',
'deletelogentry',
'deleterevision',
'edit',
+ 'editcontentmodel',
'editinterface',
'editprotected',
'editmyoptions',
'editinterface',
'editprotected',
'editmyoptions',
@@
-343,7
+350,7
@@
class User implements IDBAccessObject {
// Loading from session failed. Load defaults.
$this->loadDefaults();
}
// Loading from session failed. Load defaults.
$this->loadDefaults();
}
-
wfRunHooks
( 'UserLoadAfterLoadFromSession', array( $this ) );
+
Hooks::run
( 'UserLoadAfterLoadFromSession', array( $this ) );
break;
default:
wfProfileOut( __METHOD__ );
break;
default:
wfProfileOut( __METHOD__ );
@@
-641,10
+648,11
@@
class User implements IDBAccessObject {
global $wgContLang, $wgMaxNameChars;
if ( $name == ''
global $wgContLang, $wgMaxNameChars;
if ( $name == ''
- || User::isIP( $name )
- || strpos( $name, '/' ) !== false
- || strlen( $name ) > $wgMaxNameChars
- || $name != $wgContLang->ucfirst( $name ) ) {
+ || User::isIP( $name )
+ || strpos( $name, '/' ) !== false
+ || strlen( $name ) > $wgMaxNameChars
+ || $name != $wgContLang->ucfirst( $name )
+ ) {
wfDebugLog( 'username', __METHOD__ .
": '$name' invalid due to empty, IP, slash, length, or lowercase" );
return false;
wfDebugLog( 'username', __METHOD__ .
": '$name' invalid due to empty, IP, slash, length, or lowercase" );
return false;
@@
-701,7
+709,7
@@
class User implements IDBAccessObject {
static $reservedUsernames = false;
if ( !$reservedUsernames ) {
$reservedUsernames = $wgReservedUsernames;
static $reservedUsernames = false;
if ( !$reservedUsernames ) {
$reservedUsernames = $wgReservedUsernames;
-
wfRunHooks
( 'UserGetReservedNames', array( &$reservedUsernames ) );
+
Hooks::run
( 'UserGetReservedNames', array( &$reservedUsernames ) );
}
// Certain names may be reserved for batch processes.
}
// Certain names may be reserved for batch processes.
@@
-809,7
+817,7
@@
class User implements IDBAccessObject {
$result = false; //init $result to false for the internal checks
$result = false; //init $result to false for the internal checks
- if ( !
wfRunHooks
( 'isValidPassword', array( $password, &$result, $this ) ) ) {
+ if ( !
Hooks::run
( 'isValidPassword', array( $password, &$result, $this ) ) ) {
$status->error( $result );
return $status;
}
$status->error( $result );
return $status;
}
@@
-871,7
+879,7
@@
class User implements IDBAccessObject {
);
}
// Give extensions a chance to force an expiration
);
}
// Give extensions a chance to force an expiration
-
wfRunHooks
( 'ResetPasswordExpiration', array( $this, &$newExpire ) );
+
Hooks::run
( 'ResetPasswordExpiration', array( $this, &$newExpire ) );
$this->mPasswordExpires = $newExpire;
}
$this->mPasswordExpires = $newExpire;
}
@@
-1041,7
+1049,7
@@
class User implements IDBAccessObject {
$this->mRegistration = wfTimestamp( TS_MW );
$this->mGroups = array();
$this->mRegistration = wfTimestamp( TS_MW );
$this->mGroups = array();
-
wfRunHooks
( 'UserLoadDefaults', array( $this, $name ) );
+
Hooks::run
( 'UserLoadDefaults', array( $this, $name ) );
wfProfileOut( __METHOD__ );
}
wfProfileOut( __METHOD__ );
}
@@
-1080,7
+1088,7
@@
class User implements IDBAccessObject {
*/
private function loadFromSession() {
$result = null;
*/
private function loadFromSession() {
$result = null;
-
wfRunHooks
( 'UserLoadFromSession', array( $this, &$result ) );
+
Hooks::run
( 'UserLoadFromSession', array( $this, &$result ) );
if ( $result !== null ) {
return $result;
}
if ( $result !== null ) {
return $result;
}
@@
-1182,7
+1190,7
@@
class User implements IDBAccessObject {
: array()
);
: array()
);
-
wfRunHooks
( 'UserLoadFromDatabase', array( $this, &$s ) );
+
Hooks::run
( 'UserLoadFromDatabase', array( $this, &$s ) );
if ( $s !== false ) {
// Initialise user table data
if ( $s !== false ) {
// Initialise user table data
@@
-1448,7
+1456,7
@@
class User implements IDBAccessObject {
}
$defOpt['skin'] = Skin::normalizeKey( $wgDefaultSkin );
}
$defOpt['skin'] = Skin::normalizeKey( $wgDefaultSkin );
-
wfRunHooks
( 'UserGetDefaultOptions', array( &$defOpt ) );
+
Hooks::run
( 'UserGetDefaultOptions', array( &$defOpt ) );
return $defOpt;
}
return $defOpt;
}
@@
-1554,7
+1562,7
@@
class User implements IDBAccessObject {
}
// Extensions
}
// Extensions
-
wfRunHooks
( 'GetBlockedStatus', array( &$this ) );
+
Hooks::run
( 'GetBlockedStatus', array( &$this ) );
wfProfileOut( __METHOD__ );
}
wfProfileOut( __METHOD__ );
}
@@
-1694,7
+1702,7
@@
class User implements IDBAccessObject {
public function pingLimiter( $action = 'edit', $incrBy = 1 ) {
// Call the 'PingLimiter' hook
$result = false;
public function pingLimiter( $action = 'edit', $incrBy = 1 ) {
// Call the 'PingLimiter' hook
$result = false;
- if ( !
wfRunHooks
( 'PingLimiter', array( &$this, $action, &$result, $incrBy ) ) ) {
+ if ( !
Hooks::run
( 'PingLimiter', array( &$this, $action, &$result, $incrBy ) ) ) {
return $result;
}
return $result;
}
@@
-1838,7
+1846,7
@@
class User implements IDBAccessObject {
wfDebug( __METHOD__ . ": self-talk page, ignoring any blocks\n" );
}
wfDebug( __METHOD__ . ": self-talk page, ignoring any blocks\n" );
}
-
wfRunHooks
( 'UserIsBlockedFrom', array( $this, $title, &$blocked, &$allowUsertalk ) );
+
Hooks::run
( 'UserIsBlockedFrom', array( $this, $title, &$blocked, &$allowUsertalk ) );
wfProfileOut( __METHOD__ );
return $blocked;
wfProfileOut( __METHOD__ );
return $blocked;
@@
-1890,7
+1898,7
@@
class User implements IDBAccessObject {
$ip = $this->getRequest()->getIP();
}
$blocked = false;
$ip = $this->getRequest()->getIP();
}
$blocked = false;
-
wfRunHooks
( 'UserIsBlockedGlobally', array( &$this, $ip, &$blocked ) );
+
Hooks::run
( 'UserIsBlockedGlobally', array( &$this, $ip, &$blocked ) );
$this->mBlockedGlobally = (bool)$blocked;
return $this->mBlockedGlobally;
}
$this->mBlockedGlobally = (bool)$blocked;
return $this->mBlockedGlobally;
}
@@
-2050,7
+2058,7
@@
class User implements IDBAccessObject {
*/
public function getNewMessageLinks() {
$talks = array();
*/
public function getNewMessageLinks() {
$talks = array();
- if ( !
wfRunHooks
( 'UserRetrieveNewTalks', array( &$this, &$talks ) ) ) {
+ if ( !
Hooks::run
( 'UserRetrieveNewTalks', array( &$this, &$talks ) ) ) {
return $talks;
} elseif ( !$this->getNewtalk() ) {
return array();
return $talks;
} elseif ( !$this->getNewtalk() ) {
return array();
@@
-2427,7
+2435,7
@@
class User implements IDBAccessObject {
*/
public function getEmail() {
$this->load();
*/
public function getEmail() {
$this->load();
-
wfRunHooks
( 'UserGetEmail', array( $this, &$this->mEmail ) );
+
Hooks::run
( 'UserGetEmail', array( $this, &$this->mEmail ) );
return $this->mEmail;
}
return $this->mEmail;
}
@@
-2437,7
+2445,7
@@
class User implements IDBAccessObject {
*/
public function getEmailAuthenticationTimestamp() {
$this->load();
*/
public function getEmailAuthenticationTimestamp() {
$this->load();
-
wfRunHooks
( 'UserGetEmailAuthenticationTimestamp', array( $this, &$this->mEmailAuthenticated ) );
+
Hooks::run
( 'UserGetEmailAuthenticationTimestamp', array( $this, &$this->mEmailAuthenticated ) );
return $this->mEmailAuthenticated;
}
return $this->mEmailAuthenticated;
}
@@
-2452,7
+2460,7
@@
class User implements IDBAccessObject {
}
$this->invalidateEmail();
$this->mEmail = $str;
}
$this->invalidateEmail();
$this->mEmail = $str;
-
wfRunHooks
( 'UserSetEmail', array( $this, &$this->mEmail ) );
+
Hooks::run
( 'UserSetEmail', array( $this, &$this->mEmail ) );
}
/**
}
/**
@@
-2481,7
+2489,7
@@
class User implements IDBAccessObject {
$type = $oldaddr != '' ? 'changed' : 'set';
$result = $this->sendConfirmationMail( $type );
if ( $result->isGood() ) {
$type = $oldaddr != '' ? 'changed' : 'set';
$result = $this->sendConfirmationMail( $type );
if ( $result->isGood() ) {
- // Say t
he
the caller that a confirmation mail has been sent
+ // Say t
o
the caller that a confirmation mail has been sent
$result->value = 'eauth';
}
} else {
$result->value = 'eauth';
}
} else {
@@
-2545,9
+2553,12
@@
class User implements IDBAccessObject {
/**
* Get all user's options
*
/**
* Get all user's options
*
+ * @param int $flags Bitwise combination of:
+ * User::GETOPTIONS_EXCLUDE_DEFAULTS Exclude user options that are set
+ * to the default value. (Since 1.25)
* @return array
*/
* @return array
*/
- public function getOptions() {
+ public function getOptions(
$flags = 0
) {
global $wgHiddenPrefs;
$this->loadOptions();
$options = $this->mOptions;
global $wgHiddenPrefs;
$this->loadOptions();
$options = $this->mOptions;
@@
-2564,6
+2575,10
@@
class User implements IDBAccessObject {
}
}
}
}
+ if ( $flags & self::GETOPTIONS_EXCLUDE_DEFAULTS ) {
+ $options = array_diff_assoc( $options, self::getDefaultOptions() );
+ }
+
return $options;
}
return $options;
}
@@
-2821,7
+2836,7
@@
class User implements IDBAccessObject {
}
}
}
}
-
wfRunHooks
( 'UserResetAllOptions', array( $this, &$newOptions, $this->mOptions, $resetKinds ) );
+
Hooks::run
( 'UserResetAllOptions', array( $this, &$newOptions, $this->mOptions, $resetKinds ) );
$this->mOptions = $newOptions;
$this->mOptionsLoaded = true;
$this->mOptions = $newOptions;
$this->mOptionsLoaded = true;
@@
-2857,7
+2872,7
@@
class User implements IDBAccessObject {
return false;
} else {
$https = $this->getBoolOption( 'prefershttps' );
return false;
} else {
$https = $this->getBoolOption( 'prefershttps' );
-
wfRunHooks
( 'UserRequiresHTTPS', array( $this, &$https ) );
+
Hooks::run
( 'UserRequiresHTTPS', array( $this, &$https ) );
if ( $https ) {
$https = wfCanIPUseHTTPS( $this->getRequest()->getIP() );
}
if ( $https ) {
$https = wfCanIPUseHTTPS( $this->getRequest()->getIP() );
}
@@
-2888,7
+2903,7
@@
class User implements IDBAccessObject {
public function getRights() {
if ( is_null( $this->mRights ) ) {
$this->mRights = self::getGroupPermissions( $this->getEffectiveGroups() );
public function getRights() {
if ( is_null( $this->mRights ) ) {
$this->mRights = self::getGroupPermissions( $this->getEffectiveGroups() );
-
wfRunHooks
( 'UserGetRights', array( $this, &$this->mRights ) );
+
Hooks::run
( 'UserGetRights', array( $this, &$this->mRights ) );
// Force reindexation of rights when a hook has unset one of them
$this->mRights = array_values( array_unique( $this->mRights ) );
}
// Force reindexation of rights when a hook has unset one of them
$this->mRights = array_values( array_unique( $this->mRights ) );
}
@@
-2921,7
+2936,7
@@
class User implements IDBAccessObject {
$this->getAutomaticGroups( $recache ) // implicit groups
) );
// Hook for additional groups
$this->getAutomaticGroups( $recache ) // implicit groups
) );
// Hook for additional groups
-
wfRunHooks
( 'UserEffectiveGroups', array( &$this, &$this->mEffectiveGroups ) );
+
Hooks::run
( 'UserEffectiveGroups', array( &$this, &$this->mEffectiveGroups ) );
// Force reindexation of groups when a hook has unset one of them
$this->mEffectiveGroups = array_values( array_unique( $this->mEffectiveGroups ) );
wfProfileOut( __METHOD__ );
// Force reindexation of groups when a hook has unset one of them
$this->mEffectiveGroups = array_values( array_unique( $this->mEffectiveGroups ) );
wfProfileOut( __METHOD__ );
@@
-3018,7
+3033,7
@@
class User implements IDBAccessObject {
* @param string $group Name of the group to add
*/
public function addGroup( $group ) {
* @param string $group Name of the group to add
*/
public function addGroup( $group ) {
- if (
wfRunHooks
( 'UserAddGroup', array( $this, &$group ) ) ) {
+ if (
Hooks::run
( 'UserAddGroup', array( $this, &$group ) ) ) {
$dbw = wfGetDB( DB_MASTER );
if ( $this->getId() ) {
$dbw->insert( 'user_groups',
$dbw = wfGetDB( DB_MASTER );
if ( $this->getId() ) {
$dbw->insert( 'user_groups',
@@
-3051,7
+3066,7
@@
class User implements IDBAccessObject {
*/
public function removeGroup( $group ) {
$this->load();
*/
public function removeGroup( $group ) {
$this->load();
- if (
wfRunHooks
( 'UserRemoveGroup', array( $this, &$group ) ) ) {
+ if (
Hooks::run
( 'UserRemoveGroup', array( $this, &$group ) ) ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->delete( 'user_groups',
array(
$dbw = wfGetDB( DB_MASTER );
$dbw->delete( 'user_groups',
array(
@@
-3275,7
+3290,7
@@
class User implements IDBAccessObject {
// If we're working on user's talk page, we should update the talk page message indicator
if ( $title->getNamespace() == NS_USER_TALK && $title->getText() == $this->getName() ) {
// If we're working on user's talk page, we should update the talk page message indicator
if ( $title->getNamespace() == NS_USER_TALK && $title->getText() == $this->getName() ) {
- if ( !
wfRunHooks
( 'UserClearNewTalkNotification', array( &$this, $oldid ) ) ) {
+ if ( !
Hooks::run
( 'UserClearNewTalkNotification', array( &$this, $oldid ) ) ) {
return;
}
return;
}
@@
-3420,7
+3435,7
@@
class User implements IDBAccessObject {
$cookies['Token'] = false;
}
$cookies['Token'] = false;
}
-
wfRunHooks
( 'UserSetCookies', array( $this, &$session, &$cookies ) );
+
Hooks::run
( 'UserSetCookies', array( $this, &$session, &$cookies ) );
foreach ( $session as $name => $value ) {
$request->setSessionData( $name, $value );
foreach ( $session as $name => $value ) {
$request->setSessionData( $name, $value );
@@
-3455,7
+3470,7
@@
class User implements IDBAccessObject {
* Log this user out.
*/
public function logout() {
* Log this user out.
*/
public function logout() {
- if (
wfRunHooks
( 'UserLogout', array( &$this ) ) ) {
+ if (
Hooks::run
( 'UserLogout', array( &$this ) ) ) {
$this->doLogout();
}
}
$this->doLogout();
}
}
@@
-3520,7
+3535,7
@@
class User implements IDBAccessObject {
$this->saveOptions();
$this->saveOptions();
-
wfRunHooks
( 'UserSaveSettings', array( $this ) );
+
Hooks::run
( 'UserSaveSettings', array( $this ) );
$this->clearSharedCache();
$this->getUserPage()->invalidateCache();
}
$this->clearSharedCache();
$this->getUserPage()->invalidateCache();
}
@@
-4118,7
+4133,7
@@
class User implements IDBAccessObject {
// and fire the ConfirmEmailComplete hook on redundant confirmations.
if ( !$this->isEmailConfirmed() ) {
$this->setEmailAuthenticationTimestamp( wfTimestampNow() );
// and fire the ConfirmEmailComplete hook on redundant confirmations.
if ( !$this->isEmailConfirmed() ) {
$this->setEmailAuthenticationTimestamp( wfTimestampNow() );
-
wfRunHooks
( 'ConfirmEmailComplete', array( $this ) );
+
Hooks::run
( 'ConfirmEmailComplete', array( $this ) );
}
return true;
}
}
return true;
}
@@
-4136,7
+4151,7
@@
class User implements IDBAccessObject {
$this->mEmailTokenExpires = null;
$this->setEmailAuthenticationTimestamp( null );
$this->mEmail = '';
$this->mEmailTokenExpires = null;
$this->setEmailAuthenticationTimestamp( null );
$this->mEmail = '';
-
wfRunHooks
( 'InvalidateEmailComplete', array( $this ) );
+
Hooks::run
( 'InvalidateEmailComplete', array( $this ) );
return true;
}
return true;
}
@@
-4147,7
+4162,7
@@
class User implements IDBAccessObject {
public function setEmailAuthenticationTimestamp( $timestamp ) {
$this->load();
$this->mEmailAuthenticated = $timestamp;
public function setEmailAuthenticationTimestamp( $timestamp ) {
$this->load();
$this->mEmailAuthenticated = $timestamp;
-
wfRunHooks
( 'UserSetEmailAuthenticationTimestamp', array( $this, &$this->mEmailAuthenticated ) );
+
Hooks::run
( 'UserSetEmailAuthenticationTimestamp', array( $this, &$this->mEmailAuthenticated ) );
}
/**
}
/**
@@
-4161,7
+4176,7
@@
class User implements IDBAccessObject {
return false;
}
$canSend = $this->isEmailConfirmed();
return false;
}
$canSend = $this->isEmailConfirmed();
-
wfRunHooks
( 'UserCanSendEmail', array( &$this, &$canSend ) );
+
Hooks::run
( 'UserCanSendEmail', array( &$this, &$canSend ) );
return $canSend;
}
return $canSend;
}
@@
-4188,7
+4203,7
@@
class User implements IDBAccessObject {
global $wgEmailAuthentication;
$this->load();
$confirmed = true;
global $wgEmailAuthentication;
$this->load();
$confirmed = true;
- if (
wfRunHooks
( 'EmailConfirmed', array( &$this, &$confirmed ) ) ) {
+ if (
Hooks::run
( 'EmailConfirmed', array( &$this, &$confirmed ) ) ) {
if ( $this->isAnon() ) {
return false;
}
if ( $this->isAnon() ) {
return false;
}
@@
-4346,7
+4361,7
@@
class User implements IDBAccessObject {
}
// Allow extensions (e.g. OAuth) to say false
}
// Allow extensions (e.g. OAuth) to say false
- if ( !
wfRunHooks
( 'UserIsEveryoneAllowed', array( $right ) ) ) {
+ if ( !
Hooks::run
( 'UserIsEveryoneAllowed', array( $right ) ) ) {
$cache[$right] = false;
return false;
}
$cache[$right] = false;
return false;
}
@@
-4404,7
+4419,7
@@
class User implements IDBAccessObject {
} else {
self::$mAllRights = self::$mCoreRights;
}
} else {
self::$mAllRights = self::$mCoreRights;
}
-
wfRunHooks
( 'UserGetAllRights', array( &self::$mAllRights ) );
+
Hooks::run
( 'UserGetAllRights', array( &self::$mAllRights ) );
}
return self::$mAllRights;
}
}
return self::$mAllRights;
}
@@
-4418,7
+4433,7
@@
class User implements IDBAccessObject {
$groups = $wgImplicitGroups;
# Deprecated, use $wgImplicitGroups instead
$groups = $wgImplicitGroups;
# Deprecated, use $wgImplicitGroups instead
-
wfRunHooks
( 'UserGetImplicitGroups', array( &$groups ), '1.25' );
+
Hooks::run
( 'UserGetImplicitGroups', array( &$groups ), '1.25' );
return $groups;
}
return $groups;
}
@@
-4474,7
+4489,7
@@
class User implements IDBAccessObject {
}
$title = self::getGroupPage( $group );
if ( $title ) {
}
$title = self::getGroupPage( $group );
if ( $title ) {
- $page = $title->get
Prefixed
Text();
+ $page = $title->get
Full
Text();
return "[[$page|$text]]";
} else {
return $text;
return "[[$page|$text]]";
} else {
return $text;
@@
-4511,6
+4526,7
@@
class User implements IDBAccessObject {
// Same thing for remove
if ( empty( $wgRemoveGroups[$group] ) ) {
// Same thing for remove
if ( empty( $wgRemoveGroups[$group] ) ) {
+ // Do nothing
} elseif ( $wgRemoveGroups[$group] === true ) {
$groups['remove'] = self::getAllGroups();
} elseif ( is_array( $wgRemoveGroups[$group] ) ) {
} elseif ( $wgRemoveGroups[$group] === true ) {
$groups['remove'] = self::getAllGroups();
} elseif ( is_array( $wgRemoveGroups[$group] ) ) {
@@
-4536,6
+4552,7
@@
class User implements IDBAccessObject {
// Now figure out what groups the user can add to him/herself
if ( empty( $wgGroupsAddToSelf[$group] ) ) {
// Now figure out what groups the user can add to him/herself
if ( empty( $wgGroupsAddToSelf[$group] ) ) {
+ // Do nothing
} elseif ( $wgGroupsAddToSelf[$group] === true ) {
// No idea WHY this would be used, but it's there
$groups['add-self'] = User::getAllGroups();
} elseif ( $wgGroupsAddToSelf[$group] === true ) {
// No idea WHY this would be used, but it's there
$groups['add-self'] = User::getAllGroups();
@@
-4544,6
+4561,7
@@
class User implements IDBAccessObject {
}
if ( empty( $wgGroupsRemoveFromSelf[$group] ) ) {
}
if ( empty( $wgGroupsRemoveFromSelf[$group] ) ) {
+ // Do nothing
} elseif ( $wgGroupsRemoveFromSelf[$group] === true ) {
$groups['remove-self'] = User::getAllGroups();
} elseif ( is_array( $wgGroupsRemoveFromSelf[$group] ) ) {
} elseif ( $wgGroupsRemoveFromSelf[$group] === true ) {
$groups['remove-self'] = User::getAllGroups();
} elseif ( is_array( $wgGroupsRemoveFromSelf[$group] ) ) {
@@
-4849,7
+4867,7
@@
class User implements IDBAccessObject {
$this->mOptionsLoaded = true;
$this->mOptionsLoaded = true;
-
wfRunHooks
( 'UserLoadOptions', array( $this, &$this->mOptions ) );
+
Hooks::run
( 'UserLoadOptions', array( $this, &$this->mOptions ) );
}
/**
}
/**
@@
-4865,7
+4883,7
@@
class User implements IDBAccessObject {
// Allow hooks to abort, for instance to save to a global profile.
// Reset options to default state before saving.
// Allow hooks to abort, for instance to save to a global profile.
// Reset options to default state before saving.
- if ( !
wfRunHooks
( 'UserSaveOptions', array( $this, &$saveOptions ) ) ) {
+ if ( !
Hooks::run
( 'UserSaveOptions', array( $this, &$saveOptions ) ) ) {
return;
}
return;
}