@@ -97,11 +97,6 @@ abstract class User implements UserInterface, GroupableInterface
9797 */
9898 protected $ locked ;
9999
100- /**
101- * @var boolean
102- */
103- protected $ expired ;
104-
105100 /**
106101 * @var \DateTime
107102 */
@@ -112,11 +107,6 @@ abstract class User implements UserInterface, GroupableInterface
112107 */
113108 protected $ roles ;
114109
115- /**
116- * @var boolean
117- */
118- protected $ credentialsExpired ;
119-
120110 /**
121111 * @var \DateTime
122112 */
@@ -127,9 +117,7 @@ public function __construct()
127117 $ this ->salt = base_convert (sha1 (uniqid (mt_rand (), true )), 16 , 36 );
128118 $ this ->enabled = false ;
129119 $ this ->locked = false ;
130- $ this ->expired = false ;
131120 $ this ->roles = array ();
132- $ this ->credentialsExpired = false ;
133121 }
134122
135123 public function addRole ($ role )
@@ -161,9 +149,7 @@ public function serialize()
161149 $ this ->salt ,
162150 $ this ->usernameCanonical ,
163151 $ this ->username ,
164- $ this ->expired ,
165152 $ this ->locked ,
166- $ this ->credentialsExpired ,
167153 $ this ->enabled ,
168154 $ this ->id ,
169155 $ this ->expiresAt ,
@@ -190,9 +176,7 @@ public function unserialize($serialized)
190176 $ this ->salt ,
191177 $ this ->usernameCanonical ,
192178 $ this ->username ,
193- $ this ->expired ,
194179 $ this ->locked ,
195- $ this ->credentialsExpired ,
196180 $ this ->enabled ,
197181 $ this ->id ,
198182 $ this ->expiresAt ,
@@ -311,10 +295,6 @@ public function hasRole($role)
311295
312296 public function isAccountNonExpired ()
313297 {
314- if (true === $ this ->expired ) {
315- return false ;
316- }
317-
318298 if (null !== $ this ->expiresAt && $ this ->expiresAt ->getTimestamp () < time ()) {
319299 return false ;
320300 }
@@ -329,32 +309,18 @@ public function isAccountNonLocked()
329309
330310 public function isCredentialsNonExpired ()
331311 {
332- if (true === $ this ->credentialsExpired ) {
333- return false ;
334- }
335-
336312 if (null !== $ this ->credentialsExpireAt && $ this ->credentialsExpireAt ->getTimestamp () < time ()) {
337313 return false ;
338314 }
339315
340316 return true ;
341317 }
342318
343- public function isCredentialsExpired ()
344- {
345- return !$ this ->isCredentialsNonExpired ();
346- }
347-
348319 public function isEnabled ()
349320 {
350321 return $ this ->enabled ;
351322 }
352323
353- public function isExpired ()
354- {
355- return !$ this ->isAccountNonExpired ();
356- }
357-
358324 public function isLocked ()
359325 {
360326 return !$ this ->isAccountNonLocked ();
@@ -401,18 +367,6 @@ public function setCredentialsExpireAt(\DateTime $date = null)
401367 return $ this ;
402368 }
403369
404- /**
405- * @param boolean $boolean
406- *
407- * @return User
408- */
409- public function setCredentialsExpired ($ boolean )
410- {
411- $ this ->credentialsExpired = $ boolean ;
412-
413- return $ this ;
414- }
415-
416370 public function setEmail ($ email )
417371 {
418372 $ this ->email = $ email ;
@@ -434,20 +388,6 @@ public function setEnabled($boolean)
434388 return $ this ;
435389 }
436390
437- /**
438- * Sets this user to expired.
439- *
440- * @param Boolean $boolean
441- *
442- * @return User
443- */
444- public function setExpired ($ boolean )
445- {
446- $ this ->expired = (Boolean ) $ boolean ;
447-
448- return $ this ;
449- }
450-
451391 /**
452392 * @param \DateTime $date
453393 *
0 commit comments