public static function findByPasswordResetToken($token)
    {
        $expire = Yii::$app->params['user.passwordResetTokenExpire'];
        $parts = explode('_', $token);
        $timestamp = (int) end($parts);
        if ($timestamp + $expire < time()) {
            // token expired
            return null;
        }

        return static::findOne([
            'password_reset_token' => $token,
            'status' => self::STATUS_ACTIVE,
        ]);
    }
public static function findByPasswordResetToken($token)
    {
        $expire = Yii::$app->params['user.passwordResetTokenExpire'];
        $parts = explode('_', $token);
        $timestamp = (int) end($parts);
        if ($timestamp + $expire < time()) {
            // token expired
            return null;
        }

        return static::findOne([
            'password_reset_token' => $token,
            'status' => self::STATUS_ACTIVE,
        ]);
    }
public static function findByPasswordResetToken ( $ token ) { $ expire = Yii :: $ app -> params [ 'user.passwordResetTokenExpire' ] ; $ parts = explode ( '_' , $ token ) ; $ timestamp = ( int ) end ( $ parts ) ; if ( $ timestamp + $ expire < time ( ) ) { // token expired 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 static|null
Finds user by password reset token