for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SumoCoders\FrameworkMultiUserBundle\Security;
use SumoCoders\FrameworkMultiUserBundle\Exception\InvalidPasswordResetTokenException;
use SumoCoders\FrameworkMultiUserBundle\User\UserInterface;
class PasswordResetToken
{
/**
* @param UserInterface $user
* @param $token
*
* @return bool
* @throws InvalidPasswordResetTokenException
*/
public static function validateToken(UserInterface $user, $token)
if ($user->getPasswordResetToken() === $token) {
getPasswordResetToken()
SumoCoders\FrameworkMult...ndle\User\UserInterface
getPassword()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
return true;
}
throw new InvalidPasswordResetTokenException('The given token is not valid.');
* @return string
public static function generate()
return time() . base64_encode(random_bytes(10));
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.