本文整理汇总了PHP中Illuminate\Contracts\Auth\Authenticatable::setRememberToken方法的典型用法代码示例。如果您正苦于以下问题:PHP Authenticatable::setRememberToken方法的具体用法?PHP Authenticatable::setRememberToken怎么用?PHP Authenticatable::setRememberToken使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\Auth\Authenticatable
的用法示例。
在下文中一共展示了Authenticatable::setRememberToken方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string $token
* @return void
*/
public function updateRememberToken(Authenticatable $user, $token)
{
if ($user->exists) {
$user->setRememberToken($token);
$user->save();
}
}
示例2: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string $token
* @return void
*/
public function updateRememberToken(Authenticatable $user, $token)
{
$user->setRememberToken($token);
}
示例3: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string $token
* @return void
*/
public function updateRememberToken(UserContract $user, $token)
{
$user->setRememberToken($token);
/** @var DbObject $user */
$user->save();
}
示例4: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string $token
* @return void
*/
public function updateRememberToken(UserContract $user, $token)
{
$user->setRememberToken($token);
$user->save();
}
示例5: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string $token
*
* @return void
*/
public function updateRememberToken(AuthenticatableContract $user, $token)
{
$user->setRememberToken($token);
$this->em->persist($user);
$this->em->flush($user);
}
示例6: refreshRememberToken
/**
* Refresh the "remember me" token for the user.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return void
*/
protected function refreshRememberToken(Authenticatable $user)
{
$user->setRememberToken($token = Str::random(60));
$this->provider->updateRememberToken($user, $token);
}
示例7: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
* @param Authenticatable $user
* @param string $token
* @return void
*/
public function updateRememberToken(Authenticatable $user, $token)
{
$user->setRememberToken($token);
$this->repository->flush();
}
示例8: updateRememberToken
public function updateRememberToken(UserContract $user, $token)
{
$user->setRememberToken($token);
$this->em->persist($user);
$this->em->flush();
}
示例9: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string $token
*
* @return void
*/
public function updateRememberToken(Authenticatable $user, $token)
{
if ($this->use_remember_me == TRUE) {
if ($this->log_logins) {
Log::debug('login.updaterememberme.enabled', ['username_clean' => $user->username_clean, 'token' => $token]);
}
$user->setRememberToken($token);
$user->save();
} else {
if ($this->log_logins) {
Log::debug('login.updaterememberme.disabled', ['username_clean' => $user->username_clean, 'token' => $token]);
}
}
}
示例10: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
*
* @param IlluminateAuthenticatable $user
* @param string $token
*
* @return void
*/
public function updateRememberToken(IlluminateAuthenticatable $user, $token)
{
$user->setRememberToken($token);
$this->em->persist($user);
$this->em->flush($user);
}
示例11: updateRememberToken
/**
* @inheritdoc
*
* @param Authenticatable|User $user
*/
public function updateRememberToken(Authenticatable $user, $token)
{
$user->setRememberToken($token);
$this->saveEntityAndCommit($user);
}
示例12: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
*
* @param BaseAuthenticatable $member member entity
* @param string $token token for update
*
* @return void
*/
public function updateRememberToken(BaseAuthenticatable $member, $token)
{
$member->setRememberToken($token);
$this->repo->update($member);
}
示例13: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
* @param Authenticatable $user
* @param string $token
* @return void
*/
public function updateRememberToken(Authenticatable $user, $token)
{
$user->setRememberToken($token);
$this->entityManager->persist($user);
$this->entityManager->flush();
}
示例14: updateRememberToken
/**
* Update the "remember me" token for the given user in storage.
*
* @param UserInterface $user
* @param string $token
* @return void
*/
public function updateRememberToken(UserContract $user, $token)
{
$user->setRememberToken($token);
$this->getRepository()->store($user);
}
示例15: updateRememberToken
/**
* Updates the "remember me" token for the given user in storage.
*
* @param \Illuminate\Auth\UserInterface $user
* @param string $token
* @return void
*/
public function updateRememberToken(\Illuminate\Contracts\Auth\Authenticatable $user, $token)
{
$user->setRememberToken($token);
$this->d2repository->createQueryBuilder('u')->getEntityManager()->flush();
}