}
protected function getFormFields() {
- global $wgCookieExpiration;
-
$user = $this->getUser();
$request = $this->getRequest();
$fields['Remember'] = array(
'type' => 'check',
'label' => $this->msg( 'remembermypassword' )
- ->numParams( ceil( $wgCookieExpiration / ( 3600 * 24 ) ) )
- ->text(),
+ ->numParams(
+ ceil( $this->getConfig()->get( 'CookieExpiration' ) / ( 3600 * 24 ) )
+ )->text(),
'default' => $request->getVal( 'wpRemember' ),
);
}
* @throws PasswordError When cannot set the new password because requirements not met.
*/
protected function attemptReset( $oldpass, $newpass, $retype ) {
- global $wgPasswordAttemptThrottle;
-
$isSelf = ( $this->mUserName === $this->getUser()->getName() );
if ( $isSelf ) {
$user = $this->getUser();
$throttleCount = LoginForm::incLoginThrottle( $this->mUserName );
if ( $throttleCount === true ) {
$lang = $this->getLanguage();
+ $throttleInfo = $this->getConfig()->get( 'PasswordAttemptThrottle' );
throw new PasswordError( $this->msg( 'changepassword-throttled' )
- ->params( $lang->formatDuration( $wgPasswordAttemptThrottle['seconds'] ) )
+ ->params( $lang->formatDuration( $throttleInfo['seconds'] ) )
->text()
);
}