Save model to authManager
@return boolean
190153
public function save()
    {
        if ($this->validate()) {
            $manager = Configs::authManager();
            $class = $this->className;
            if ($this->_item === null) {
                $this->_item = new $class();
                $isNew = true;
            } else {
                $isNew = false;
                $oldName = $this->_item->name;
            }
            $this->_item->name = $this->name;

            if ($isNew) {
                $manager->add($this->_item);
            } else {
                $manager->update($oldName, $this->_item);
            }

            return true;
        } else {
            return false;
        }
    }
928624
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();
            }
        }
    }
1011487
public function beforeSave()
    {
        if ('' !== $password = $this->getElement('changePassword')->getValue()) {
            $this->getRecord()->password = \Cms\Model\Auth::getSaltedPasswordHash($password);
        }
        return true;
    }
524870
private function bindModels()
    {
        $bindings = [
            'users'              => AuthContracts\User::class,
            'roles'              => AuthContracts\Role::class,
            'permissions'        => AuthContracts\Permission::class,
            'permissions-groups' => AuthContracts\PermissionsGroup::class,
        ];

        foreach ($bindings as $key => $contract) {
            $this->bind($contract, $this->config()->get("laravel-auth.$key.model"));
        }
    }
1151002
public function save()
    {
        if (!$this->validate())
            return false;

        $meta = new UserMetadata;
        $meta->attributes = array(
            'user_id' => $this->_user->id,
            'key' => $this->provider.'Provider',
            'value' => $this->adapter->identifier
        );

        // Save the associative object
        return $meta->save();
    }
620399
public function save()
    {
        $id = $this->search(0)->getValue();
        $passCheck = $this->search("format", "passwordRequired");
        if ($passCheck) {
            $d = new Dicionario("usuarios");
            $columnPass = $d->search($d->getInfo()['password'])->getColumn();
        }
        if (!$passCheck || $passCheck->getValue() === $_SESSION['userlogin'][$columnPass]) {
            $this->checkSetorChangeToHigh();
            if (!$this->getError() || !empty($id))
                $this->saveAssociacaoSimples();

            // Create or Update Data
            if (!empty($id)) {
                $dicDataAtual = new Dicionario($this->entity);
                $dicDataAtual->setData($id);
                $oldDados = $dicDataAtual->getDataForm();
                $this->updateTableData($id);
            } elseif (!$this->getError()) {
                $this->createTableData();
            }

            if (!$this->getError() || !empty($id)) {
                if (!$this->info)
                    $this->info = Metadados::getInfo($this->entity);

                $this->createRelationalData();

                $dados = $this->getDataForm();
                if (!empty($id)) {
                    $react = new React("update", $this->entity, $dados, $oldDados);
                } else {
                    $react = new React("create", $this->entity, $dados);
                }
                $data = $react->getResponse();

                if(!empty($data['error'])) {
                    if(is_array($data['error'])) {
                        foreach ($data['error'] as $column => $err) {
                            if(is_string($column) && is_string($err) && $meta = $this->search($column)) {
                                $meta->setError($err);
                            }
                        }
                    } else {
                        $this->search(0)->setError($data['error']);
                    }
                } else {
                    $this->setData($this->search(0)->getValue());
                }
            }
        } else {
            $passCheck->setError("Senha Inválida");
        }
    }
363855
public function Save(){
        if($this->transactionActive) {
            try {
                $this->commit();
                $this->exec("SET FOREIGN_KEY_CHECKS = 1;");
            } catch (\Exception $e) {
                $this->rollBack();
                echo $e->getMessage();
            }

            $this->transactionActive = false;
        }

        return false;
    }
1252477
public function getAuthManager() {
		if ($this->authManager === null) {
			$this->authManager = new AuthManager($this);
		}

		return $this->authManager;
	}
1312348
public function save()
    {

        if ($this->id) {
            $this->id = shmop_open($this->key, $this->mode, $this->permission, $this->size);
        }

        @shmop_write($this->id, serialize($this->data), $this->offset);

        return true;
    }
34160
public function saveFromPost()
    {
        $id = str_replace('\\', '_', get_class($this));
        if ($data = \Devil::app()->post->getOnce($id)) {
            unset($data[$this->getRoleValue('id')]);
            if (isset($data['clearAttachment'])) {
                foreach (array_keys($data['clearAttachment']) as $attr) {
                    $this->clearAttached($attr);
                }
            }
            $this->setAttributes($data);
            if ($this->validate()) {
                $this->save();
                return true;
            } else {
                // validation contains errors
            }
        }
        return false;
    }
1186872
public function save()
    {
        $array = $this->toArrayWithoutEmptyValues();

        $query = $this->createQuery();

        $now = (new \DateTime())->format('Y-m-d H:i:s');

        if ($this->{$this->getTableKey()}) {
            $query->setAction('update');
            $query->where($query->buildAndSet([
                [$this->getTableKey(), "=", $this->id],
            ]));

            foreach ($array as $key => $value) {
                $query->addValue($key, $value);
            }

            // Since it's an update, add updated_at if the model implements it
            if (property_exists($this, 'updated_at')) {
                $query->addValue('updated_at', $now);
                $this->updated_at = $now;
            }
        } else {
            $query->setAction('insert');

            foreach ($array as $key => $value) {
                if ($key !== $this->tableKey) {
                    $query->addValue($key, $value);
                }
            }

            // Since it's an insert, add created_at if the model implements it
            if (property_exists($this, 'created_at')) {
                $query->addValue('created_at', $now);
                $this->created_at = $now;
            }
        }
        $result = $this->database->query($query);
        if ($result && $query->getAction() === 'insert') {
            $this->id = $this->database->getInstance()->lastInsertId();
        }
        return $result ? true : false;
    }
215133
public function save()
    {
        if ($this->validate()) {
            $this->user->scenario = 'settings';
            $this->user->username = $this->username;
            $this->user->nickname = $this->nickname;
            $this->user->password = $this->new_password;
            if ($this->email == $this->user->email && $this->user->unconfirmed_email != null) {
                $this->user->unconfirmed_email = null;
            } elseif ($this->email != $this->user->email) {
                switch ($this->getSetting('emailChangeStrategy')) {
                    case Settings::STRATEGY_INSECURE:
                        $this->insecureEmailChange();
                        break;
                    case Settings::STRATEGY_DEFAULT:
                        $this->defaultEmailChange();
                        break;
                    case Settings::STRATEGY_SECURE:
                        $this->secureEmailChange();
                        break;
                    default:
                        throw new \OutOfBoundsException('Invalid email changing strategy');
                }
            }
            return $this->user->save();
        }
        return false;
    }
859814
public function save()
    {
        if ($this->validate()) {

            $authManager = Yii::$app->authManager;

            $item = $authManager->getRole($this->name);
            if ($item) {
                $update = true;
            } else {
                $item = $authManager->createRole($this->name);
                $update = false;
            }

            $item->description = $this->description;
            $item->ruleName = $this->rule_name;
            $item->data = $this->data;

            if ($update) {
                if (!$authManager->update($this->name, $item)) {
                    return false;
                }
            } else {
                if (!$authManager->add($item)) {
                    return false;
                }
            }

            $this->isNewRecord = false;

            $authManager->removeChildren($item);
            if ($this->_childRoles !== null) {
                foreach ($this->_childRoles as $childName) {
                    $child = $authManager->getRole($childName);
                    $authManager->addChild($item, $child);
                }
            }
            if ($this->_childPermissions !== null) {
                foreach ($this->_childPermissions as $childName) {
                    $child = $authManager->getPermission($childName);
                    $authManager->addChild($item, $child);
                }
            }

        } else {
            return false;
        }

        return true;
    }
223520
public function save()
    {

        if (!empty($this->ltiResultSourcedId) && !is_null($this->resourceLinkId)) {
            $ok = $this->getDataConnector()->saveUser($this);
        } else {
            $ok = true;
        }

        return $ok;

    }
922479
public function store()
    {
        $class = $this->model;

        $this->validate(request(), $this->getValidationRules());

        // Create
        $model = new $class($this->input);
        return $model->save()
            ? [
                'success' => ucfirst($this->readableResourceType()) . ' created successfully.',
                'model' => $model->toArray(),
            ]
            : ['error' => 'There was a problem saving the ' . $this->readableResourceType() . '.'];
    }
910336
protected function saveData()
    {
        $newKey = $this->formData['twoFactorKey'];

        if ($newKey) {
            if ($this->user->canSaveTwoFactorKey()) {
                $enabled = $this->formData['twoFactorEnabled'] ? 1 : 0;
            } else {
                $enabled = null;
            }

            $this->user->setTwoFactorKey($this->authenticator, $newKey, $enabled);

            $this->addMessage($this->_('Two factor authentication setting saved.'));
        }

        return 0;
    }
948967
public function getAuthManager(): ?AuthManager
    {
        if (!$this->hasAuthManager()) {
            $this->setAuthManager($this->getDefaultAuthManager());
        }
        return $this->authManager;
    }