src/entities/User.php
public static function findByPasswordResetToken(string $token) : ?self
    {
        if (!static::isPasswordResetTokenValid($token)) {
            return null;
        }
        return static::findOne([
            'password_reset_token' => $token,
            'status' => self::STATUS_ACTIVE,
        ]);
    }
public static function findByPasswordResetToken(string $token) : ?self
    {
        if (!static::isPasswordResetTokenValid($token)) {
            return null;
        }
        return static::findOne([
            'password_reset_token' => $token,
            'status' => self::STATUS_ACTIVE,
        ]);
    }
public static function findByPasswordResetToken ( string $ token ) : ? self { if ( ! static :: isPasswordResetTokenValid ( $ token ) ) { return null ; } return static :: findOne ( [ 'password_reset_token' => $ token , 'status' => self :: STATUS_ACTIVE , ] ) ; }
Finds user by password reset token.
@param string $token password reset token.
@return self
Finds user by password reset token .