mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fixed linting errors
This commit is contained in:
parent
12c2edc1d5
commit
fa568e333e
@ -94,14 +94,14 @@ class CMSSecurity extends Security
|
||||
$message = parent::getSessionMessage($messageType);
|
||||
if ($message) {
|
||||
return $message;
|
||||
}
|
||||
}
|
||||
|
||||
// Format
|
||||
return _t(
|
||||
return _t(
|
||||
__CLASS__.'.LOGIN_MESSAGE',
|
||||
'<p>Your session has timed out due to inactivity</p>'
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there is a logged in member
|
||||
|
@ -268,7 +268,7 @@ class Member extends DataObject
|
||||
{
|
||||
Deprecation::notice('5.0', 'Use DefaultAdminService::findOrCreateDefaultAdmin() instead');
|
||||
return DefaultAdminService::singleton()->findOrCreateDefaultAdmin();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the passed password matches the stored one (if the member is not locked out).
|
||||
@ -287,12 +287,12 @@ class Member extends DataObject
|
||||
$authenticators = Security::singleton()->getApplicableAuthenticators(Authenticator::CHECK_PASSWORD);
|
||||
foreach ($authenticators as $authenticator) {
|
||||
$authenticator->checkPassword($this, $password, $result);
|
||||
if (!$result->isValid()) {
|
||||
if (!$result->isValid()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if this user is the currently configured default admin
|
||||
|
@ -100,12 +100,12 @@ class MemberAuthenticator implements Authenticator
|
||||
}
|
||||
} elseif ($member) {
|
||||
$member->registerSuccessfulLogin();
|
||||
} else {
|
||||
// A non-existing member occurred. This will make the result "valid" so let's invalidate
|
||||
$result->addError(_t(
|
||||
'SilverStripe\\Security\\Member.ERRORWRONGCRED',
|
||||
"The provided details don't seem to be correct. Please try again."
|
||||
));
|
||||
} else {
|
||||
// A non-existing member occurred. This will make the result "valid" so let's invalidate
|
||||
$result->addError(_t(
|
||||
'SilverStripe\\Security\\Member.ERRORWRONGCRED',
|
||||
"The provided details don't seem to be correct. Please try again."
|
||||
));
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ class MemberAuthenticator implements Authenticator
|
||||
// Check a password is set on this member
|
||||
if (empty($member->Password) && $member->exists()) {
|
||||
$result->addError(_t(__CLASS__ . '.NoPassword', 'There is no password on this member.'));
|
||||
}
|
||||
}
|
||||
|
||||
$encryptor = PasswordEncryptor::create_for_algorithm($member->PasswordEncryption);
|
||||
if (!$encryptor->check($member->Password, $password, $member->Salt, $member)) {
|
||||
|
@ -1012,7 +1012,7 @@ class Security extends Controller implements TemplateGlobalProvider
|
||||
|
||||
$service = DefaultAdminService::singleton();
|
||||
return $service->findOrCreateDefaultAdmin();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush the default admin credentials
|
||||
|
Loading…
x
Reference in New Issue
Block a user