@@ -6,9 +6,9 @@ discard block |
||
| 6 | 6 | use Illuminate\Foundation\Auth\User as Authenticatable; |
| 7 | 7 | |
| 8 | 8 | class User extends Authenticatable implements \Illuminate\Contracts\Auth\Authenticatable, |
| 9 | - \Illuminate\Contracts\Auth\Access\Authorizable, |
|
| 10 | - \Illuminate\Contracts\Auth\CanResetPassword, |
|
| 11 | - \Tymon\JWTAuth\Contracts\JWTSubject |
|
| 9 | + \Illuminate\Contracts\Auth\Access\Authorizable, |
|
| 10 | + \Illuminate\Contracts\Auth\CanResetPassword, |
|
| 11 | + \Tymon\JWTAuth\Contracts\JWTSubject |
|
| 12 | 12 | { |
| 13 | 13 | use Notifiable; |
| 14 | 14 | use \Silber\Bouncer\Database\HasRolesAndAbilities; |
@@ -32,16 +32,16 @@ discard block |
||
| 32 | 32 | ]; |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * @return mixed |
|
| 36 | - */ |
|
| 35 | + * @return mixed |
|
| 36 | + */ |
|
| 37 | 37 | public function getJWTIdentifier() |
| 38 | 38 | { |
| 39 | 39 | return $this->getKey(); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | - * @return array |
|
| 44 | - */ |
|
| 43 | + * @return array |
|
| 44 | + */ |
|
| 45 | 45 | public function getJWTCustomClaims() |
| 46 | 46 | { |
| 47 | 47 | return ['user' => ['id' => $this->id]]; |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | * Get the ID for the currently authenticated user. |
| 99 | 99 | * |
| 100 | 100 | * @return string|null |
| 101 | - */ |
|
| 101 | + */ |
|
| 102 | 102 | public function id() |
| 103 | 103 | { |
| 104 | 104 | if ($user = $this->user()) { |
@@ -44,9 +44,9 @@ |
||
| 44 | 44 | if(count($user->groups)) { |
| 45 | 45 | // remove the users existing database roles before assigning new ones |
| 46 | 46 | \DB::table('assigned_roles') |
| 47 | - ->where('entity_id', $authUser->id) |
|
| 48 | - ->where('entity_type', get_class($authUser)) |
|
| 49 | - ->delete(); |
|
| 47 | + ->where('entity_id', $authUser->id) |
|
| 48 | + ->where('entity_type', get_class($authUser)) |
|
| 49 | + ->delete(); |
|
| 50 | 50 | // add the user to each group they are assigned |
| 51 | 51 | $authUser->assign($user->groups); |
| 52 | 52 | } |
@@ -24,9 +24,9 @@ |
||
| 24 | 24 | if(count($user->groups)) { |
| 25 | 25 | // remove the users existing database roles before assigning new ones |
| 26 | 26 | \DB::table('assigned_roles') |
| 27 | - ->where('entity_id', $authUser->id) |
|
| 28 | - ->where('entity_type', get_class($authUser)) |
|
| 29 | - ->delete(); |
|
| 27 | + ->where('entity_id', $authUser->id) |
|
| 28 | + ->where('entity_type', get_class($authUser)) |
|
| 29 | + ->delete(); |
|
| 30 | 30 | // add the user to each group they are assigned |
| 31 | 31 | $authUser->assign($user->groups); |
| 32 | 32 | } |