Skip to content

Commit 07c3169

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: [Validator] Fix return types Add translation for Belarusian fix parsing calls of methods named "method" [Security] Remove unnecessary inherited doc annotation deal with indented heredoc/nowdoc tokens Adding templates for Belarusian
2 parents b9874b1 + 07feaed commit 07c3169

File tree

2 files changed

+40
-4
lines changed

2 files changed

+40
-4
lines changed

Resources/translations/security.be.xlf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@
6262
<source>Account is locked.</source>
6363
<target>Акаўнт заблакіраван.</target>
6464
</trans-unit>
65+
<trans-unit id="17">
66+
<source>Too many failed login attempts, please try again later.</source>
67+
<target>Зашмат няўдалых спроб уваходу, калі ласка, паспрабуйце пазней.</target>
68+
</trans-unit>
69+
<trans-unit id="18">
70+
<source>Invalid or expired login link.</source>
71+
<target>Спасылка для ўваходу несапраўдная або пратэрмінаваная.</target>
72+
</trans-unit>
6573
</body>
6674
</file>
6775
</xliff>

User/User.php

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,31 +83,59 @@ public function getUsername(): string
8383
}
8484

8585
/**
86-
* {@inheritdoc}
86+
* Checks whether the user's account has expired.
87+
*
88+
* Internally, if this method returns false, the authentication system
89+
* will throw an AccountExpiredException and prevent login.
90+
*
91+
* @return bool true if the user's account is non expired, false otherwise
92+
*
93+
* @see AccountExpiredException
8794
*/
8895
public function isAccountNonExpired(): bool
8996
{
9097
return $this->accountNonExpired;
9198
}
9299

93100
/**
94-
* {@inheritdoc}
101+
* Checks whether the user is locked.
102+
*
103+
* Internally, if this method returns false, the authentication system
104+
* will throw a LockedException and prevent login.
105+
*
106+
* @return bool true if the user is not locked, false otherwise
107+
*
108+
* @see LockedException
95109
*/
96110
public function isAccountNonLocked(): bool
97111
{
98112
return $this->accountNonLocked;
99113
}
100114

101115
/**
102-
* {@inheritdoc}
116+
* Checks whether the user's credentials (password) has expired.
117+
*
118+
* Internally, if this method returns false, the authentication system
119+
* will throw a CredentialsExpiredException and prevent login.
120+
*
121+
* @return bool true if the user's credentials are non expired, false otherwise
122+
*
123+
* @see CredentialsExpiredException
103124
*/
104125
public function isCredentialsNonExpired(): bool
105126
{
106127
return $this->credentialsNonExpired;
107128
}
108129

109130
/**
110-
* {@inheritdoc}
131+
* Checks whether the user is enabled.
132+
*
133+
* Internally, if this method returns false, the authentication system
134+
* will throw a DisabledException and prevent login.
135+
*
136+
* @return bool true if the user is enabled, false otherwise
137+
*
138+
* @see DisabledException
111139
*/
112140
public function isEnabled(): bool
113141
{

0 commit comments

Comments
 (0)