Model/User.php
public function createPayPalUser($payPalData)
    {
        $userData = $this->prepareDataPayPalUser($payPalData);

        $userId = $this->getIdByUserName($payPalData->getEmail());
        if ($userId) {
            $this->load($userId);
        }

        $this->oxuser__oxactive = new \OxidEsales\Eshop\Core\Field(1);
        $this->oxuser__oxusername = new \OxidEsales\Eshop\Core\Field($payPalData->getEmail());
        $this->oxuser__oxfname = new \OxidEsales\Eshop\Core\Field($userData['oxfname']);
        $this->oxuser__oxlname = new \OxidEsales\Eshop\Core\Field($userData['oxlname']);
        $this->oxuser__oxfon = new \OxidEsales\Eshop\Core\Field($userData['oxfon']);
        $this->oxuser__oxsal = new \OxidEsales\Eshop\Core\Field($userData['oxsal']);
        $this->oxuser__oxcompany = new \OxidEsales\Eshop\Core\Field($userData['oxcompany']);
        $this->oxuser__oxstreet = new \OxidEsales\Eshop\Core\Field($userData['oxstreet']);
        $this->oxuser__oxstreetnr = new \OxidEsales\Eshop\Core\Field($userData['oxstreetnr']);
        $this->oxuser__oxcity = new \OxidEsales\Eshop\Core\Field($userData['oxcity']);
        $this->oxuser__oxzip = new \OxidEsales\Eshop\Core\Field($userData['oxzip']);
        $this->oxuser__oxcountryid = new \OxidEsales\Eshop\Core\Field($userData['oxcountryid']);
        $this->oxuser__oxstateid = new \OxidEsales\Eshop\Core\Field($userData['oxstateid']);
        $this->oxuser__oxaddinfo = new \OxidEsales\Eshop\Core\Field($userData['oxaddinfo']);
        $this->oxuser__oxpassword = new \OxidEsales\Eshop\Core\Field('');
        $this->oxuser__oxbirthdate = new \OxidEsales\Eshop\Core\Field('');

        if ($this->save()) {
            $this->_setAutoGroups($this->oxuser__oxcountryid->value);

            // and adding to group "oxidnotyetordered"
            $this->addToGroup("oxidnotyetordered");
        }
    }
public function createPayPalUser($payPalData)
    {
        $userData = $this->prepareDataPayPalUser($payPalData);

        $userId = $this->getIdByUserName($payPalData->getEmail());
        if ($userId) {
            $this->load($userId);
        }

        $this->oxuser__oxactive = new \OxidEsales\Eshop\Core\Field(1);
        $this->oxuser__oxusername = new \OxidEsales\Eshop\Core\Field($payPalData->getEmail());
        $this->oxuser__oxfname = new \OxidEsales\Eshop\Core\Field($userData['oxfname']);
        $this->oxuser__oxlname = new \OxidEsales\Eshop\Core\Field($userData['oxlname']);
        $this->oxuser__oxfon = new \OxidEsales\Eshop\Core\Field($userData['oxfon']);
        $this->oxuser__oxsal = new \OxidEsales\Eshop\Core\Field($userData['oxsal']);
        $this->oxuser__oxcompany = new \OxidEsales\Eshop\Core\Field($userData['oxcompany']);
        $this->oxuser__oxstreet = new \OxidEsales\Eshop\Core\Field($userData['oxstreet']);
        $this->oxuser__oxstreetnr = new \OxidEsales\Eshop\Core\Field($userData['oxstreetnr']);
        $this->oxuser__oxcity = new \OxidEsales\Eshop\Core\Field($userData['oxcity']);
        $this->oxuser__oxzip = new \OxidEsales\Eshop\Core\Field($userData['oxzip']);
        $this->oxuser__oxcountryid = new \OxidEsales\Eshop\Core\Field($userData['oxcountryid']);
        $this->oxuser__oxstateid = new \OxidEsales\Eshop\Core\Field($userData['oxstateid']);
        $this->oxuser__oxaddinfo = new \OxidEsales\Eshop\Core\Field($userData['oxaddinfo']);
        $this->oxuser__oxpassword = new \OxidEsales\Eshop\Core\Field('');
        $this->oxuser__oxbirthdate = new \OxidEsales\Eshop\Core\Field('');

        if ($this->save()) {
            $this->_setAutoGroups($this->oxuser__oxcountryid->value);

            // and adding to group "oxidnotyetordered"
            $this->addToGroup("oxidnotyetordered");
        }
    }
public function createPayPalUser ( $ payPalData ) { $ userData = $ this -> prepareDataPayPalUser ( $ payPalData ) ; $ userId = $ this -> getIdByUserName ( $ payPalData -> getEmail ( ) ) ; if ( $ userId ) { $ this -> load ( $ userId ) ; } $ this -> oxuser__oxactive = new \ OxidEsales \ Eshop \ Core \ Field ( 1 ) ; $ this -> oxuser__oxusername = new \ OxidEsales \ Eshop \ Core \ Field ( $ payPalData -> getEmail ( ) ) ; $ this -> oxuser__oxfname = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxfname' ] ) ; $ this -> oxuser__oxlname = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxlname' ] ) ; $ this -> oxuser__oxfon = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxfon' ] ) ; $ this -> oxuser__oxsal = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxsal' ] ) ; $ this -> oxuser__oxcompany = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxcompany' ] ) ; $ this -> oxuser__oxstreet = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxstreet' ] ) ; $ this -> oxuser__oxstreetnr = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxstreetnr' ] ) ; $ this -> oxuser__oxcity = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxcity' ] ) ; $ this -> oxuser__oxzip = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxzip' ] ) ; $ this -> oxuser__oxcountryid = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxcountryid' ] ) ; $ this -> oxuser__oxstateid = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxstateid' ] ) ; $ this -> oxuser__oxaddinfo = new \ OxidEsales \ Eshop \ Core \ Field ( $ userData [ 'oxaddinfo' ] ) ; $ this -> oxuser__oxpassword = new \ OxidEsales \ Eshop \ Core \ Field ( '' ) ; $ this -> oxuser__oxbirthdate = new \ OxidEsales \ Eshop \ Core \ Field ( '' ) ; if ( $ this -> save ( ) ) { $ this -> _setAutoGroups ( $ this -> oxuser__oxcountryid -> value ) ; // and adding to group "oxidnotyetordered" $ this -> addToGroup ( "oxidnotyetordered" ) ; } }
Creates user from PayPal data.

@param \OxidEsales\PayPalModule\Model\Response\ResponseGetExpressCheckoutDetails $payPalData Data returned from PayPal.
Creates user from PayPal data .