[Security] Add custom getMessageKey
AccountStatusException childs
This commit is contained in:
parent
1147977212
commit
50e2cfc1f5
@ -15,7 +15,15 @@ namespace Symfony\Component\Security\Core\Exception;
|
||||
* AccountExpiredException is thrown when the user account has expired.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Alexander <iam.asm89@gmail.com>
|
||||
*/
|
||||
class AccountExpiredException extends AccountStatusException
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getMessageKey()
|
||||
{
|
||||
return 'security.exception.account_expired_exception';
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,15 @@ namespace Symfony\Component\Security\Core\Exception;
|
||||
* CredentialsExpiredException is thrown when the user account credentials have expired.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Alexander <iam.asm89@gmail.com>
|
||||
*/
|
||||
class CredentialsExpiredException extends AccountStatusException
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getMessageKey()
|
||||
{
|
||||
return 'security.exception.credentials_expired_exception';
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,15 @@ namespace Symfony\Component\Security\Core\Exception;
|
||||
* DisabledException is thrown when the user account is disabled.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Alexander <iam.asm89@gmail.com>
|
||||
*/
|
||||
class DisabledException extends AccountStatusException
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getMessageKey()
|
||||
{
|
||||
return 'security.exception.disabled_exception';
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,15 @@ namespace Symfony\Component\Security\Core\Exception;
|
||||
* LockedException is thrown if the user account is locked.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Alexander <iam.asm89@gmail.com>
|
||||
*/
|
||||
class LockedException extends AccountStatusException
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getMessageKey()
|
||||
{
|
||||
return 'security.exception.locked_exception';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user