Queue the recaller cookie into the cookie jar.

@param  \Illuminate\Contracts\Auth\Authenticatable  $user
@return void
177217
protected function queueRecallerCookie(AuthenticatableContract $user)
    {
        $this->getCookieJar()->queue($this->createRecaller(
            $user->getAuthIdentifier().'|'.$user->getRememberToken().'|'.$user->getAuthPassword()
        ));
    }
390414
public function setUser(AuthenticatableContract $user)
    {
        $this->user = $user;
        $this->loggedOut = FALSE;
        $this->fireAuthenticatedEvent($user);

        return $this;
    }
1090850
public function logout(Event $event, array $user)
    {
        $this->_registry->Cookie->delete($this->_config['cookie']['name']);
    }
167210
protected function performLogin($user, $rememberMe = true)
    {
        // log user in
        $loginDuration = $rememberMe ? $this->module->loginDuration : 0;
        Yii::$app->user->login($user, $loginDuration);

        // check for a valid returnUrl (to prevent a weird login bug)
        //   https://github.com/amnah/yii2-user/issues/115
        $loginRedirect = $this->module->loginRedirect;
        $returnUrl = Yii::$app->user->getReturnUrl($loginRedirect);
        if (strpos($returnUrl, "user/login") !== false || strpos($returnUrl, "user/logout") !== false) {
            $returnUrl = null;
        }

        return $returnUrl;
    }
1173382
public function persistUser(User $user)
    {
        $this->objectManager->persist($user);
        $this->objectManager->flush();

        return $user;
    }
388872
protected function _setUser(array $user)
    {
        if (isset($this->_controller()->request->data['remember'])) {
            $user['password'] = $this->_controller()->request->data['password'];
            $this->_controller()->Cookie->write('CookieAuth', $user);
        }
        $this->_controller()->Auth->setUser($user);
    }
851861
public function setUserData(User $user)
    {
        $userVarArray = get_object_vars($user);

        foreach ($userVarArray as $key => $value) {
            if ($value !== null) {
                $this->{$key} = $value;
            }
        }
    }
1347041
public static function getUserGuard(Authenticatable $user)
    {
        $provider = self::getUserProvider($user);

        return self::getProviderGuard($provider, $user);
    }
334219
protected function fireAuthenticatedEvent($user)
    {
        if (isset($this->events)) {
            $this->events->dispatch(new Authenticated($user));
        }
    }
136662
public function login(AuthenticatableContract $user, $remember = false)
    {
        $this->updateSession($user->getAuthIdentifier());

        // If the user should be permanently "remembered" by the application we will
        // queue a permanent cookie that contains the encrypted copy of the user
        // identifier. We will then decrypt this later to retrieve the users.
        if ($remember) {
            $this->ensureRememberTokenIsSet($user);

            $this->queueRecallerCookie($user);
        }

        // 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);
    }
258495
public function setAndSendUserActivationToken($user)
    {
        $token = md5(str_random(40));

        $user->meta()->update([
            'activation_token' => $token
        ]);

        $user->notify(new ActivateUserEmail($token));
    }
940874
public function detachUser( $user )
  {
    if( is_object($user))
      $user = $user->getKey();

    if( is_array($user))
      $user = $user['id'];

    $this->users()->detach( $user );
  }
233292
public function setUser(User $user): void
    {
        $this->user = $user;
        $this->user->setAcl($this);

        $userRole = $this->user->getRole();
        if ($userRole != null && !empty($this->rules)) {
            foreach ($this->rules as $role => $rules) {
                if ($userRole == $role) {
                    foreach ($rules as $uri => $rules) {
                        $this->user->setPermissionsOf($uri, (array) explode(',', $rules) /* 'read,write' etc. */);
                    }
                    break;
                }
            }
        }
    }
1324457
public static function set_user($user): void
	{
		// Sets the history table name
		if ( bbn\str::is_uid($user) ){
			self::$user = $user;
		}
	}
695827
public static function AddNewUserToSession($caller, $user) {
        $users = self::GetAndStoreUsersInSession($caller);
        $users[] = $user;
        $caller->app()->user->setAttribute(
                \Puzzlout\Framework\Enums\SessionKeys::AllUsers, $users
        );
    }
248540
public function updateRememberToken(Authenticatable $user, $token)
    {
        $user->setRememberToken($token);
        $this->em->persist($user);
        $this->em->flush($user);
    }
916634
public function login(UserContract $user, $remember = false)
	{
		$this->updateSession($user->getAuthIdentifier());

		// If the user should be permanently "remembered" by the application we will
		// queue a permanent cookie that contains the encrypted copy of the user
		// identifier. We will then decrypt this later to retrieve the users.
		if ($remember)
		{
			$this->createRememberTokenIfDoesntExist($user);

			$this->queueRecallerCookie($user);
		}

		// 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);
	}