Update the "remember me" token for the given user in storage.

@param  \Illuminate\Contracts\Auth\Authenticatable|\Illuminate\Database\Eloquent\Model  $user
@param  string  $token
@return void
197529
public function updateRememberToken(UserContract $user, $token)
    {
        $user->setRememberToken($token);

        $timestamps = $user->timestamps;

        $user->timestamps = false;

        $user->save();

        $user->timestamps = $timestamps;
    }
685134
public function saveToken(Token $token)
    {
        $this->db
            ->merge('ucms_user_token')
            ->key(['uid' => $token->uid])
            ->fields([
                'token' => $token->token,
                'expiration_date' => $token->expiration_date->format('Y-m-d H:i:s'),
            ])
            ->execute();
    }
639178
public function updateUser(User $user)
    {
        $request = $user->toJson();
        $this->client->put(sprintf('/v2/user/%s', $user->getId()), $request);
    }
516314
protected function fireLoginEvent($user, $remember = FALSE)
    {
        if (isset($this->events)) {
            $this->events->dispatch(new Login($user, $remember));
        }
    }
853001
public function rememberPassword()
    {
        $this->rememberPasswordToken = new UserToken();

        $this->publish(
            new UserRememberPasswordRequested(
                $this->id,
                $this->email,
                $this->rememberPasswordToken
            )
        );
    }
470705
public static function login($user)
  {
    $token = $user->{config('auth.provider.' . Auth::$provider . '.with')} = Hash::random(70);
    $user->save();

    return Remember::login($token);
  }
758220
public function updateToken(Token $token, $andFlush = true)
    {
        $this->doctrine->getManager()->persist($token);
        if ($andFlush) {
            $this->doctrine->getManager()->flush();
        }
    }
677845
protected function fireUpdatedEvent(Authenticatable $user, Token $token)
    {
        if ($this->updatedEvent === null || !class_exists($this->updatedEvent)) {
            return;
        }

        event(new $this->updatedEvent($user, $token));
    }
128580
public function login(UserContract $user, $remember = false)
    {
        wp_set_auth_cookie($user->ID, $remember);

        wp_set_current_user($user->ID);

        // If we have an event dispatcher instance set we will fire an event so that
        // any listeners will hook into the authentication events and run actions
        // based on the login and logout events fired from the guard instances.
        $this->fireLoginEvent($user, $remember);

        $this->setUser($user);
    }
295726
private function refreshRememberCookie(UserInterface $user, $gerenateToken = true)
    {
        $expire = is_numeric($this->expire) ? time() + 60 * $this>expire : strtotime("+" . $this->expire);
        if (!$gerenateToken) {
            $token = $_COOKIE[$this->cookieName];
        } else {
            $token = $this->randomPassword(32);
        }

        $this->rememberMeProvider->setUserRememberMeToken($user, $token);

        setcookie($this->cookieName, $token, $expire, $this->url);
    }
1197111
public function setRefreshTokenForUser($adminUser, $token)
    {
        $adminUser = $adminUser->setRefreshToken($token);
        $this->userResource->save($adminUser);
    }
872402
public function setUser(/* string */ $user) {
		// Close connection before changing username.
		if ($this->user !== $user) {
			$this->close();
			$this->user = $user;
		}
	}
851861
public function setUserData(User $user)
    {
        $userVarArray = get_object_vars($user);

        foreach ($userVarArray as $key => $value) {
            if ($value !== null) {
                $this->{$key} = $value;
            }
        }
    }
286375
public function updateUser(User $user)
    {
        $this->find("id", $user->id);
        $this->setUserData($user);
        $this->save();
    }
36819
def remember
      self.remember_token = Incline::User::new_token
      update_attribute(:remember_digest, Incline::User::digest(self.remember_token))
    end
32160
protected function regenerateToken($user)
    {
        $token = $this->getToken();

        DB::table($this->table)->where('user_id', $user->id)->update([
            'token'      => $token,
            'created_at' => Carbon::now()->toDateTimeString(),
        ]);

        return $token;
    }
1256532
public function updateRefreshToken(): void
    {

        tap($this->token, function ($token) {

            // If no API call was made, the client would never have
            // been instantiated and auth information never updated.
            if (is_null($this->client) || $this->public_call)
                return;

            $last_auth = $this->client->getAuthentication();

            $token->token = $last_auth->access_token ?? '-';
            $token->expires_on = $last_auth->token_expires;

            $token->save();
        });
    }