source/Core/GenericImport/ImportObject/User.php
public function import($data)
    {
        if (isset($data['OXUSERNAME'])) {
            $id = $data['OXID'];
            $userName = $data['OXUSERNAME'];

            $user = oxNew(\OxidEsales\Eshop\Application\Model\User::class, "core");
            $user->oxuser__oxusername = new \OxidEsales\Eshop\Core\Field($userName, \OxidEsales\Eshop\Core\Field::T_RAW);

            if ($user->exists($id) && $id != $user->getId()) {
                throw new Exception("USER $userName already exists!");
            }
        }

        return parent::import($data);
    }
public function import($data)
    {
        if (isset($data['OXUSERNAME'])) {
            $id = $data['OXID'];
            $userName = $data['OXUSERNAME'];

            $user = oxNew(\OxidEsales\Eshop\Application\Model\User::class, "core");
            $user->oxuser__oxusername = new \OxidEsales\Eshop\Core\Field($userName, \OxidEsales\Eshop\Core\Field::T_RAW);

            if ($user->exists($id) && $id != $user->getId()) {
                throw new Exception("USER $userName already exists!");
            }
        }

        return parent::import($data);
    }
public function import ( $ data ) { if ( isset ( $ data [ 'OXUSERNAME' ] ) ) { $ id = $ data [ 'OXID' ] ; $ userName = $ data [ 'OXUSERNAME' ] ; $ user = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ User :: class , "core" ) ; $ user -> oxuser__oxusername = new \ OxidEsales \ Eshop \ Core \ Field ( $ userName , \ OxidEsales \ Eshop \ Core \ Field :: T_RAW ) ; if ( $ user -> exists ( $ id ) && $ id != $ user -> getId ( ) ) { throw new Exception ( "USER $userName already exists!" ) ; } } return parent :: import ( $ data ) ; }
Imports user. Returns import status.

@param array $data db row array

@throws Exception If user exists with provided OXID, throw an exception.

@return string $oxid on success, bool FALSE on failure
Imports user . Returns import status .