source/Application/Model/User.php
protected function _getLoginQuery($userName, $password, $shopId, $isAdmin)
    {
        $database = DatabaseProvider::getDb();
        $userNameCondition = $this->formQueryPartForUserName($userName, $database);
        $shopOrRightsCondition = $this->formQueryPartForAdminView($shopId, $isAdmin);
        $passwordCondition = $this->formQueryPartForSha512Password($password, $database, $userNameCondition, $shopOrRightsCondition);
        $userActiveCondition = $this->formQueryPartForActiveUser();


        $query = "SELECT `oxid`
                    FROM oxuser 
                    WHERE 1  
                    AND $userActiveCondition 
                    AND $passwordCondition 
                    AND $userNameCondition 
                    $shopOrRightsCondition
                    ";

        return $query;
    }
protected function _getLoginQuery($userName, $password, $shopId, $isAdmin)
    {
        $database = DatabaseProvider::getDb();
        $userNameCondition = $this->formQueryPartForUserName($userName, $database);
        $shopOrRightsCondition = $this->formQueryPartForAdminView($shopId, $isAdmin);
        $passwordCondition = $this->formQueryPartForSha512Password($password, $database, $userNameCondition, $shopOrRightsCondition);
        $userActiveCondition = $this->formQueryPartForActiveUser();


        $query = "SELECT `oxid`
                    FROM oxuser 
                    WHERE 1  
                    AND $userActiveCondition 
                    AND $passwordCondition 
                    AND $userNameCondition 
                    $shopOrRightsCondition
                    ";

        return $query;
    }
protected function _getLoginQuery ( $ userName , $ password , $ shopId , $ isAdmin ) { $ database = DatabaseProvider :: getDb ( ) ; $ userNameCondition = $ this -> formQueryPartForUserName ( $ userName , $ database ) ; $ shopOrRightsCondition = $ this -> formQueryPartForAdminView ( $ shopId , $ isAdmin ) ; $ passwordCondition = $ this -> formQueryPartForSha512Password ( $ password , $ database , $ userNameCondition , $ shopOrRightsCondition ) ; $ userActiveCondition = $ this -> formQueryPartForActiveUser ( ) ; $ query = "SELECT `oxid`
                    FROM oxuser 
                    WHERE 1  
                    AND $userActiveCondition 
                    AND $passwordCondition 
                    AND $userNameCondition 
                    $shopOrRightsCondition
                    " ; return $ query ; }
Builds and returns user login query

@param string $userName
@param string $password
@param int    $shopId
@param bool   $isAdmin

@deprecated since v6.4.0 (2019-03-15); This method will be removed completely.

@return string
Builds and returns user login query