oxid 4.9x: Login weiter mit Kundennummer

Oxid Source: Ein kleiner Eingriff reicht, um die Kundennummer weiter für den Login nutzen zu können*: oxuser.php ab Zeile 1275 folgendes ersetzen:

protected function _getLoginQuery($sUser, $sPassword, $sShopID, $blAdmin)
{
$myConfig = $this->getConfig();
$oDb = oxDb::getDb();

$sUserSelect = “oxuser.oxusername = ” . $oDb->quote($sUser);

$sSalt = $oDb->getOne(“SELECT `oxpasssalt` FROM `oxuser` WHERE  ” . $sUserSelect);

$sPassSelect = ” oxuser.oxpassword = ” . $oDb->quote($this->encodePassword($sPassword, $sSalt));
$sShopSelect = “”;

// admin view: can only login with higher than ‘user’ rights
if ($blAdmin) {
$sShopSelect = ” and ( oxrights != ‘user’ ) “;
}

$sSelect = “select `oxid` from oxuser where oxuser.oxactive = 1 and {$sPassSelect} and {$sUserSelect} {$sShopSelect} “;

return $sSelect;
}

mit:

protected function _getLoginQuery($sUser, $sPassword, $sShopID, $blAdmin)
{
$myConfig = $this->getConfig();
$oDb = oxDb::getDb();

$sUserSelect = is_numeric( $sUser ) ? “oxuser.oxcustnr = “. $oDb->quote($sUser) : “oxuser.oxusername = ” . $oDb->quote( $sUser );

$sSalt = $oDb->getOne(“SELECT `oxpasssalt` FROM `oxuser` WHERE  ” . $sUserSelect);

$sPassSelect = ” oxuser.oxpassword = ” . $oDb->quote($this->encodePassword($sPassword, $sSalt));
$sShopSelect = “”;

// admin view: can only login with higher than ‘user’ rights
if ($blAdmin) {
$sShopSelect = ” and ( oxrights != ‘user’ ) “;
}

$sSelect = “select `oxid` from oxuser where oxuser.oxactive = 1 and {$sPassSelect} and {$sUserSelect} {$sShopSelect} “;

return $sSelect;
}

 

Speichere in deinen Favoriten diesen Permalink.

Die Kommentare sind geschlossen.