Пример #1
0
 /**
  * {@inheritDoc}
  */
 public function equals(UserInterface $user)
 {
     if (!$user instanceof User) {
         return false;
     }
     if ($this->password !== $user->getPassword()) {
         return false;
     }
     if ($this->getSalt() !== $user->getSalt()) {
         return false;
     }
     if ($this->username !== $user->getUsername()) {
         return false;
     }
     if ($this->accountNonExpired !== $user->isAccountNonExpired()) {
         return false;
     }
     if ($this->accountNonLocked !== $user->isAccountNonLocked()) {
         return false;
     }
     if ($this->credentialsNonExpired !== $user->isCredentialsNonExpired()) {
         return false;
     }
     if ($this->enabled !== $user->isEnabled()) {
         return false;
     }
     return true;
 }