Generates or resets and saves users update key

@param bool $blReset marker to reset update info
340732
public function setUpdateKey($blReset = false)
    {
        $utilsObject = $this->getUtilsObjectInstance();
        $sUpKey = $blReset ? '' : $utilsObject->generateUId();
        $iUpTime = $blReset ? 0 : Registry::getUtilsDate()->getTime() + $this->getUpdateLinkTerm();

        // generating key
        $this->oxuser__oxupdatekey = new \OxidEsales\Eshop\Core\Field($sUpKey, Field::T_RAW);

        // setting expiration time for 6 hours
        $this->oxuser__oxupdateexp = new \OxidEsales\Eshop\Core\Field($iUpTime, Field::T_RAW);

        // saving
        $this->save();
    }
291034
public function resetPath($path = '')
    {
        $this->blob = (new Blob($this->package))->setPath($path);

        // Ensure that user folder exists on first load
        $userFolder = Str::normalizePath(config('cripfilesys.user_folder'));
        if ($this->blob->path == $userFolder) {
            $this->makeDirectory();
        }
    }
716079
function postSave($create = false)
    {
        if (! is_null($this->callbackURL) && strpos($this->callbackURL, '{secure_id}')) {
            $this->callbackURL = str_replace('{secure_id}', $this->secure_id, $this->callbackURL);
            $this->update();
        }
    }
1191612
public function prepareOrder( array $aPostData, $blSettingsUpdated = false )
    {
        // Update user profile with values user entered to Paymorrow form
        $this->_updateUserData( $aPostData );

        // Reset payment method in session and basket on its change
        $this->_resetPaymentMethod( $aPostData );

        // Send order preparation.verification request
        $aResponse = $this->_getRequestController()->pmVerify( $aPostData );
        oxRegistry::get( 'OxpsPaymorrowLogger' )->logWithType( $aPostData, 'Proxy-prepareOrderPOST' );

        /** @var OxpsPaymorrowResponseHandler $oResponseHandler */
        $oResponseHandler   = oxRegistry::get( 'OxpsPaymorrowResponseHandler' );
        $iResponseErrorCore = $oResponseHandler->getErrorCodeFromResponseData( $aResponse );

        // Check of response is an error with configuration update error code 900
        if ( ( $iResponseErrorCore === 900 ) and empty( $blSettingsUpdated ) ) {

            // Call module settings update in case error code 900 received
            oxRegistry::get( 'OxpsPaymorrowModule' )->updateSettings();

            // Call the request again
            return $this->prepareOrder( $aPostData, true );
        }

        return json_encode( $aResponse );
    }
1211816
protected function _getUserViewId($blReset = false)
    {
        if ($this->_sUserViewId != null && !$blReset) {
            return $this->_sUserViewId;
        }

        // loading R&R data from session
        $userSessionGroups = $this->getCurrentUserSessionGroups();
        $this->_sUserViewId = md5(\OxidEsales\Eshop\Core\Registry::getConfig()->getShopID() . \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageTag() . serialize($userSessionGroups) . (int) $this->isAdmin());

        return $this->_sUserViewId;
    }
311859
public function update($table, Closure $closure)
    {
        $blueprint = $this->createBlueprint($table, $closure);
        $blueprint->update();
    }
1146686
function reset($Ensure = false)
	{
		if ($Ensure !== true)
		{
			throw new \Exception ("You must pass true to this function, otherwise it won't work.");
			return;
		}
		$res = Jf::sql ( "DELETE FROM {$this->tablePrefix()}{$this->type()}" );
		$Adapter = get_class(Jf::$Db);
		if ($this->isMySql())
			Jf::sql ( "ALTER TABLE {$this->tablePrefix()}{$this->type()} AUTO_INCREMENT=1 " );
		elseif ($this->isSQLite())
			Jf::sql ( "delete from sqlite_sequence where name=? ", $this->tablePrefix () . "{$this->type()}" );
		else
			throw new \Exception ( "Rbac can not reset table on this type of database: {$Adapter}" );
		$iid = Jf::sql ( "INSERT INTO {$this->tablePrefix()}{$this->type()} (Title,Description,Lft,Rght) VALUES (?,?,?,?)", "root", "root",0,1 );
		return (int)$res;
	}
698246
public function delete($clear = true)
    {
        $revisions = Revision::where('content_id', $this->content->id)->get();

        $ids = $revisions->pluck('id');

        $this->getFieldTypes()->each(function ($type) use ($ids) {
            $type::whereIn('revision_id', $ids)->delete();
        });

        Revision::whereIn('id', $ids)->delete();
        $this->revision->exists = false;

        // TODO :: add an event system to be able to remove this content from entity fields

        $this->content->delete();

        if ($clear) {
            $this->revision->id = null;
            $this->content->id = null;
            $this->clearFields();
        }
    }
565300
public function setResetParams($resetParams)
        {
            $this->_resetParams = (bool) $resetParams;
            $this->_hrefCache   = null;

            return $this;
        }
485613
public static function reset( $resetGlobal = true )
	{
		XBRL_Instance::$instance_taxonomy = array();
		if ( ! $resetGlobal ) return;
		XBRL_Global::reset();
		XBRL_Types::reset();
	}
496324
function generateUpdateChildren( $paexToUpdate = array() )
    {
        eZDebug::writeDebug( 'Start', __METHOD__ );

        if ( !$this->attribute( 'updatechildren' ) )
        {
            eZDebug::writeDebug( 'UpdateChildren flag disabled. Nothing to do.', __METHOD__ );
        }
        else
        {
            $newPasswordvalidationregexp = $this->attribute( 'passwordvalidationregexp' );
            $newPasswordlifetime = $this->attribute( 'passwordlifetime' );
            $newExpirationnotification = $this->attribute( 'expirationnotification' );

            // Fetch the main node that belongs to the current paex
            $mainNodeID = eZContentObjectTreeNode::findMainNode( $this->attribute( 'contentobject_id' ) );
            eZDebug::writeDebug( 'Going to update subtree starting at node ' . $mainNodeID . '.', __METHOD__ );

            // Fetch the full subtree array to update
            $fullSubtree = eZContentObjectTreeNode::subTreeByNodeID( array( "MainNodeOnly" => false,
                                                                            "AsObject" => false ),
                                                                    $mainNodeID );

            foreach ( $fullSubtree as $node )
            {
                // Fetch the paex for each node
                $addPaexToUpdate = eZPaEx::fetch( $node["contentobject_id"] );
                // If the paex is not marked to updatechildren, update the paex object
                if ( $addPaexToUpdate instanceof eZPaEx  &&
                     $addPaexToUpdate->attribute( 'updatechildren' ) != 1 )
                {
                    $addPaexToUpdate->setAttribute('passwordvalidationregexp', $newPasswordvalidationregexp );
                    $addPaexToUpdate->setAttribute('passwordlifetime', $newPasswordlifetime );
                    $addPaexToUpdate->setAttribute('expirationnotification', $newExpirationnotification );
                    $paexToUpdate[$node["contentobject_id"]] = $addPaexToUpdate;
                }
                else
                {
                    eZDebug::writeDebug( 'Skipping object ' . $add_paex_to_update['contentobject_id'] , __METHOD__ );
                }
            }
        }
        eZDebug::writeDebug( 'End', __METHOD__ );

        return $paexToUpdate;
    }
1239732
public function setRefreshToken($tenantKey, $refreshToken)
    {
        if ($this->tenantTokens[$tenantKey] == null) {
            $this->tenantTokens[$tenantKey] = array();
        }
        $this->tenantTokens[$tenantKey]['refreshToken'] = $refreshToken;
    }
625934
public function setTarget( $domainOrIp, $resetStatus = TRUE ){
		if( $this->target !== $domainOrIp ){
			$this->target	= $domainOrIp;
			if( $resetStatus )
				$this->status	= self::STATUS_UNKNOWN;
		}
		return $this;
	}
862416
public function reset_caches($phpunitreset = false) {
        // Clear the on-disk disk with aggregated string files.
        $this->cache->purge();
        $this->menucache->purge();

        if (!$phpunitreset) {
            // Increment the revision counter.
            $langrev = get_config('core', 'langrev');
            $next = time();
            if ($langrev !== false and $next <= $langrev and $langrev - $next < 60*60) {
                // This resolves problems when reset is requested repeatedly within 1s,
                // the < 1h condition prevents accidental switching to future dates
                // because we might not recover from it.
                $next = $langrev+1;
            }
            set_config('langrev', $next);
        }

        // Lang packs use PHP files in dataroot, it is better to invalidate opcode caches.
        if (function_exists('opcache_reset')) {
            opcache_reset();
        }
    }
153225
public function setWURFLLoaded($loaded = true)
    {
        $this->save(self::WURFL_LOADED, $loaded);
        $this->cacheSave(self::WURFL_LOADED, new StorageObject($loaded, 0));
    }
761422
function storeObjectAttribute( $contentObjectAttribute )
    {
        $paex = $contentObjectAttribute->content();
        if ( !$paex instanceof eZPaEx )
        {
			// create a default paex object
            $paex = eZPaEx::create( $contentObjectAttribute->attribute( "contentobject_id" ) );
        }
        $paex->store();
        $contentObjectAttribute->setContent( $paex );
    }
71230
function updateAndStoreModified()
    {
        $pathString = trim( $this->attribute( 'path_string' ), '/' );

        // during publishing, a temporary path is generated. The update query shouldn't be executed as it doesn't affect anything
        if ( $pathString == 'TEMPPATH' )
            return;
        $pathArray = explode( '/', $pathString );

        if ( count( $pathArray ) > 0 )
        {
            $db = eZDB::instance();
            $db->query( 'UPDATE ezcontentobject_tree SET modified_subnode=' . time() .
                        ' WHERE ' . $db->generateSQLINStatement( $pathArray, 'node_id', false, true, 'int' ) );
        }
    }