public static function findByPasswordResetToken($token, $status = self::STATUS_ACTIVE)
    {
        if (!static::isPasswordResetTokenValid($token)) {
            return null;
        }
        if ($status == null) {
            return static::find()->where(['password_reset_token' => $token])->limit(1)->one();
        }
        return static::find()->where(['password_reset_token' => $token, 'status' => $status])->limit(1)->one();
    }
public static function findByPasswordResetToken($token, $status = self::STATUS_ACTIVE)
    {
        if (!static::isPasswordResetTokenValid($token)) {
            return null;
        }
        if ($status == null) {
            return static::find()->where(['password_reset_token' => $token])->limit(1)->one();
        }
        return static::find()->where(['password_reset_token' => $token, 'status' => $status])->limit(1)->one();
    }
public static function findByPasswordResetToken ( $ token , $ status = self :: STATUS_ACTIVE ) { if ( ! static :: isPasswordResetTokenValid ( $ token ) ) { return null ; } if ( $ status == null ) { return static :: find ( ) -> where ( [ 'password_reset_token' => $ token ] ) -> limit ( 1 ) -> one ( ) ; } return static :: find ( ) -> where ( [ 'password_reset_token' => $ token , 'status' => $ status ] ) -> limit ( 1 ) -> one ( ) ; }
Finds user of given status by password reset token
@param string $token password reset token
@param string|null $status user status or null
@return static|null
Finds user of given status by password reset token