1 | <?php |
||
2 | |||
3 | namespace Imanghafoori\TokenizedLogin; |
||
4 | |||
5 | use Illuminate\Foundation\Auth\User; |
||
6 | |||
7 | class UserProvider |
||
8 | { |
||
9 | public function getUserByEmail($email) |
||
10 | { |
||
11 | $user = User::where('email', $email)->first(); |
||
12 | |||
13 | return nullable($user); |
||
14 | } |
||
15 | |||
16 | public function isBanned($uid) |
||
17 | { |
||
18 | $user = User::find($uid) ?: new User(); |
||
19 | |||
20 | return $user->is_ban == 1 ? true : false; |
||
0 ignored issues
–
show
|
|||
21 | } |
||
22 | } |
||
23 |
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.