* @param int $ts Optional timestamp to convert, default 0 for the current time
*/
public function expirePassword( $ts = 0 ) {
- $this->load();
+ $this->loadPasswords();
$timestamp = wfTimestamp( TS_MW, $ts );
$this->mPasswordExpires = $timestamp;
$this->saveSettings();
return $this->mLocked;
}
global $wgAuth;
- StubObject::unstub( $wgAuth );
$authUser = $wgAuth->getUserInstance( $this );
$this->mLocked = (bool)$authUser->isLocked();
return $this->mLocked;
$this->getBlockedStatus();
if ( !$this->mHideName ) {
global $wgAuth;
- StubObject::unstub( $wgAuth );
$authUser = $wgAuth->getUserInstance( $this );
$this->mHideName = (bool)$authUser->isHidden();
}
/**
* Check if user is allowed to access a feature / make an action
*
- * @internal param \String $varargs permissions to test
+ * @param string $permissions,... Permissions to test
* @return bool True if user is allowed to perform *any* of the given actions
- *
- * @return bool
*/
public function isAllowedAny( /*...*/ ) {
$permissions = func_get_args();
/**
*
- * @internal param $varargs string
+ * @param string $permissions,... Permissions to test
* @return bool True if the user is allowed to perform *all* of the given actions
*/
public function isAllowedAll( /*...*/ ) {
*/
public function checkPassword( $password ) {
global $wgAuth, $wgLegacyEncoding;
+
+ $section = new ProfileSection( __METHOD__ );
+
$this->loadPasswords();
// Certain authentication plugins do NOT want to save
// domain passwords in a mysql database, so we should
// check this (in case $wgAuth->strict() is false).
-
if ( $wgAuth->authenticate( $this->getName(), $password ) ) {
return true;
} elseif ( $wgAuth->strict() ) {