/**
  * Verifies given password by given user credentials (using password salt)
  * when user trying to login the system first time.
  *
  * Called by doctrinemodule's authentication configuration on login.
  *
  * @static
  *
  * @param  UserEntity $user
  * @param  string     $passwordGiven
  *
  * @return boolean
  */
 public static function verifyPassword(UserEntity $user, $passwordGiven)
 {
     $verified = password_verify($passwordGiven, $user->getPassword());
     if ($verified) {
         // You may also want to check user status here.
         // For example; $user->isBlacklisted() or $user->isVerified() etc..
         return true;
     }
     return false;
 }
 /**
  * Verifies given password by given user credentials (using password salt)
  * when user trying to login the system first time.
  *
  * Called by doctrinemodule's authentication configuration on login.
  *
  * @static
  *
  * @param  UserEntity $user
  * @param  string     $passwordGiven
  *
  * @return boolean
  */
 public static function verifyPassword(UserEntity $user, $passwordGiven)
 {
     return self::verifyRawPassword($user->getPassword(), $passwordGiven);
 }