/
LegacyAdvancedUserInterface.php
46 lines (41 loc) · 1.34 KB
/
LegacyAdvancedUserInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace UserBase\Client\Model;
/**
* For backwards compatability only - use UserCheckers instead.
*
* This iface replaces Symfony\Component\Security\Core\User\AdvancedUserInterface
* which was removed from Symfony 5 because the User class is not the right place
* to implement account/user checks that influence whether or not a user is
* allowed to authenticate. For more info about why it was removed see:
* https://github.com/symfony/symfony/issues/23292
*
* For info about UserCheckers see:
* https://symfony.com/doc/current/security/user_checkers.html
*/
interface LegacyAdvancedUserInterface
{
/**
* Check whether the user's account has expired.
*
* @return bool true if the user's account is non expired, false otherwise
*/
public function isAccountNonExpired();
/**
* Check whether the user is locked.
*
* @return bool true if the user is not locked, false otherwise
*/
public function isAccountNonLocked();
/**
* Check whether the user's credentials have expired.
*
* @return bool true if the user's credentials are non expired, false otherwise
*/
public function isCredentialsNonExpired();
/**
* Check whether the user is enabled.
*
* @return bool true if the user is enabled, false otherwise
*/
public function isEnabled();
}