1 <?php namespace BookStack\Auth\Access;
3 use BookStack\Auth\User;
4 use BookStack\Notifications\UserInvite;
6 class UserInviteService extends UserTokenService
8 protected $tokenTable = 'user_invites';
9 protected $expiryTime = 336; // Two weeks
12 * Send an invitation to a user to sign into BookStack
13 * Removes existing invitation tokens.
16 public function sendInvitation(User $user)
18 $this->deleteByUser($user);
19 $token = $this->createTokenForUser($user);
20 $user->notify(new UserInvite($token));