Update a users last login

@param \Carbon\Carbon|null $override
@return $this
@throws \Laranix\Support\Exception\NullValueException
355414
public function updateLastLogin(?Carbon $override = null)
    {
        $name = $this->getLastLoginKey();

        if ($this->getAttributeFromArray($name) === null) {
            throw new NullValueException("Property {$name} not set on this object");
        }

        $this->{$name} = $override === null ? Carbon::now()->toDateTimeString() : $override->toDateTimeString();

        $this->lastLoginParsed = null;

        return $this;
    }
1096489
public function setHeaders($headers, $override = true)
    {
        if ($override == false) {
            $this->headers = array_merge($headers, $this->headers);
        } else {
            $this->headers = $headers;
        }

        return $this;
    }
24304
public function setLastLogin($v)
    {
        $dt = PropelDateTime::newInstance($v, null, 'DateTime');
        if ($this->last_login !== null || $dt !== null) {
            $currentDateAsString = ($this->last_login !== null && $tmpDt = new DateTime($this->last_login)) ? $tmpDt->format('Y-m-d H:i:s') : null;
            $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
            if ($currentDateAsString !== $newDateAsString) {
                $this->last_login = $newDateAsString;
                $this->modifiedColumns[] = UserPeer::LAST_LOGIN;
            }
        } // if either are not null


        return $this;
    }
71767
public function setRecipientOverride($recipientOverride)
    {
        if (!$recipientOverride) {
            return $this;
        }

        if (!filter_var($recipientOverride, FILTER_VALIDATE_EMAIL)) {
            throw new Exception('Recipient override must be a valid email address');
        }

        $this->recipientOverride = (string) $recipientOverride;

        return $this;
    }
617460
public function actionLastLogins()
    {
        return UserLogin::find()->select(['user_id', 'max(timestamp_create) as maxdate'])->joinWith(['user' => function ($q) {
            $q->select(['id', 'firstname', 'lastname']);
        }])->limit(10)->groupBy(['user_id'])->orderBy(['maxdate' => SORT_DESC])->asArray()->all();
    }
1363534
private function sync_install( $override = array(), $flush = false ) {
            $this->_logger->entrance();

            $site = $this->send_install_update( $override, $flush );

            if ( false === $site ) {
                // No sync required.
                return;
            }

            if ( ! $this->is_api_result_entity( $site ) ) {
                // Failed to sync, don't update locally.
                return;
            }

            $this->_site = new FS_Site( $site );

            $this->_store_site( true );
        }
7632
public function setLastUser($lastUser)
    {
        if (\is_object($lastUser)) {
            $this->lastUserObject = $lastUser;
            $this->lastUser       = $lastUser->getId();
        } else {
            $this->lastUserObject = null;
            $this->lastUser       = $lastUser;
        }

        return $this;
    }
571826
public function modifyCacheKey($cacheKey, $override = false)
    {
        if ($override) {
            $this->_sCacheKey = $cacheKey . "|i18n";
        } else {
            $this->_sCacheKey .= $cacheKey;
        }

        if (!$cacheKey) {
            $this->_sCacheKey = null;
        }
    }
829207
public function set( $key, $value = null, $overwrite = true )
    {
        //	Passed in an array or object
        if ( null === $value )
        {
            if ( $key instanceof \Traversable )
            {
                foreach ( $key as $_key => $_value )
                {
                    $this->set( $_key, $_value, $overwrite );
                }

                return $this;
            }
            else if ( $key instanceof Interfaces\SeedLike )
            {
                $value = $key;
                $key = $value->getId();
            }
        }

        $_exists = Utility\Option::contains( $this->_bag, $key );

        if ( false === $overwrite && $_exists && ( null !== ( $_oldValue = Utility\Option::get( $this->_bag, $key ) ) ) )
        {
            throw new Exceptions\BagException( 'The property "' . $key . '" is read-only.' );
        }

        if ( false !== $this->_fixedSize && !$_exists )
        {
            throw new Exceptions\BagException( 'This class does not have a property named "' . $key . '"' );
        }

        Utility\Option::set( $this->_bag, $key, $value );

        return $this;
    }
574757
public function getLastLogin() : Carbon
    {
        if ($this->lastLoginParsed !== null) {
            return $this->lastLoginParsed;
        }

        $name = $this->getLastLoginKey();

        $lastLogin = $this->asDateTime($this->getAttributeFromArray($name) ?? Carbon::now());

        return $this->{$name} = $this->lastLoginParsed = Carbon::createFromFormat('Y-m-d H:i:s', $lastLogin);
    }
1269559
public function sendCookies($override = false)
    {
        if (headers_sent() && !$override) {
            return $this;
        }

        // Iterate through our Cookies data collection and set each cookie natively
        foreach ($this->cookies as $cookie) {
            // Use the built-in PHP "setcookie" function
            setcookie(
                $cookie->getName(),
                $cookie->getValue(),
                $cookie->getExpire(),
                $cookie->getPath(),
                $cookie->getDomain(),
                $cookie->getSecure(),
                $cookie->getHttpOnly()
            );
        }

        return $this;
    }
699545
public function getActions($override = false)
    {
        //make sure we only run this once and then return the cached version
        if (empty($this->actions) || $override) {
            $this->actions = array();

            //loop over the actions to build the list
            foreach ($this->config->getOption('actions') as $name => $options) {
                $this->actions[] = $this->make($name, $options);
            }
        }

        return $this->actions;
    }
1194374
public function setOverride($key, $value = null)
    {
        if(is_array($key))
            foreach($key as $k => $val)
                $this->override[$k] = $val;
        else
            $this->override[$key] = $value;

        return $this;
    }
1142546
public function refreshIfExpired()
    {
        $user = $this->getFrameworkBridge()->getCurrentUser();

        if (! $user) {
            return null;
        }

        $token = $user->getOAuthToken();
        if ($token && $token->hasExpired()) {
            $this->refreshAccessToken($token);
        }
    }
731744
public function listAction(array $override = [])
    {
        $demand = $this->createDemandFromSettings();

        if (!empty($override) && $this->settings['allowOverride']) {
            $this->overrideDemand($demand, $override);
        }

        if ($demand->getSingleRecords()) {
            $addresses = $this->addressRepository->getAddressesByCustomSorting($demand);
        } else {
            $addresses = $this->addressRepository->findByDemand($demand);
        }

        $this->view->assignMultiple([
            'demand' => $demand,
            'addresses' => $addresses
        ]);

        CacheUtility::addCacheTagsByAddressRecords(
            $addresses instanceof QueryResultInterface ? $addresses->toArray() : $addresses
        );
    }
977726
public function setHeader($name, $value, $override = true)
    {
        if ($override == false) {
            if (array_key_exists($name, $this->headers)) {
                return $this;
            }
        }

        $this->headers[$name] = $value;
    }
1252603
public function add(string $key, $value, bool $override = false)
    {
        if (!$override && $this->exists($key)) {
            return;
        }

        $this->parameters[$key] = $value;
    }