source/Application/Controller/Admin/UserMain.php
public function save()
    {
        parent::save();

        //allow admin information edit only for MALL admins
        $soxId = $this->getEditObjectId();
        if ($this->_allowAdminEdit($soxId)) {
            $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");

            // checkbox handling
            if (!isset($aParams['oxuser__oxactive'])) {
                $aParams['oxuser__oxactive'] = 0;
            }

            $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
            if ($soxId != "-1") {
                $oUser->load($soxId);
            } else {
                $aParams['oxuser__oxid'] = null;
            }

            //setting new password
            if (($sNewPass = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("newPassword"))) {
                $oUser->setPassword($sNewPass);
            }

            //FS#2167 V checks for already used email
            if ($oUser->checkIfEmailExists($aParams['oxuser__oxusername'])) {
                $this->_sSaveError = 'EXCEPTION_USER_USEREXISTS';

                return;
            }

            $oUser->assign($aParams);

            //seting shop id for ONLY for new created user
            if ($soxId == "-1") {
                $this->onUserCreation($oUser);
            }

            // A. changing field type to save birth date correctly
            $oUser->oxuser__oxbirthdate->fldtype = 'char';

            try {
                $oUser->save();

                // set oxid if inserted
                $this->setEditObjectId($oUser->getId());
            } catch (Exception $oExcp) {
                $this->_sSaveError = $oExcp->getMessage();
            }
        }
    }
public function save()
    {
        parent::save();

        //allow admin information edit only for MALL admins
        $soxId = $this->getEditObjectId();
        if ($this->_allowAdminEdit($soxId)) {
            $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");

            // checkbox handling
            if (!isset($aParams['oxuser__oxactive'])) {
                $aParams['oxuser__oxactive'] = 0;
            }

            $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
            if ($soxId != "-1") {
                $oUser->load($soxId);
            } else {
                $aParams['oxuser__oxid'] = null;
            }

            //setting new password
            if (($sNewPass = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("newPassword"))) {
                $oUser->setPassword($sNewPass);
            }

            //FS#2167 V checks for already used email
            if ($oUser->checkIfEmailExists($aParams['oxuser__oxusername'])) {
                $this->_sSaveError = 'EXCEPTION_USER_USEREXISTS';

                return;
            }

            $oUser->assign($aParams);

            //seting shop id for ONLY for new created user
            if ($soxId == "-1") {
                $this->onUserCreation($oUser);
            }

            // A. changing field type to save birth date correctly
            $oUser->oxuser__oxbirthdate->fldtype = 'char';

            try {
                $oUser->save();

                // set oxid if inserted
                $this->setEditObjectId($oUser->getId());
            } catch (Exception $oExcp) {
                $this->_sSaveError = $oExcp->getMessage();
            }
        }
    }
public function save ( ) { parent :: save ( ) ; //allow admin information edit only for MALL admins $ soxId = $ this -> getEditObjectId ( ) ; if ( $ this -> _allowAdminEdit ( $ soxId ) ) { $ aParams = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "editval" ) ; // checkbox handling if ( ! isset ( $ aParams [ 'oxuser__oxactive' ] ) ) { $ aParams [ 'oxuser__oxactive' ] = 0 ; } $ oUser = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ User :: class ) ; if ( $ soxId != "-1" ) { $ oUser -> load ( $ soxId ) ; } else { $ aParams [ 'oxuser__oxid' ] = null ; } //setting new password if ( ( $ sNewPass = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "newPassword" ) ) ) { $ oUser -> setPassword ( $ sNewPass ) ; } //FS#2167 V checks for already used email if ( $ oUser -> checkIfEmailExists ( $ aParams [ 'oxuser__oxusername' ] ) ) { $ this -> _sSaveError = 'EXCEPTION_USER_USEREXISTS' ; return ; } $ oUser -> assign ( $ aParams ) ; //seting shop id for ONLY for new created user if ( $ soxId == "-1" ) { $ this -> onUserCreation ( $ oUser ) ; } // A. changing field type to save birth date correctly $ oUser -> oxuser__oxbirthdate -> fldtype = 'char' ; try { $ oUser -> save ( ) ; // set oxid if inserted $ this -> setEditObjectId ( $ oUser -> getId ( ) ) ; } catch ( Exception $ oExcp ) { $ this -> _sSaveError = $ oExcp -> getMessage ( ) ; } } }
Saves main user parameters.

@return mixed
Saves main user parameters .