Skip to content

Commit fdd418e

Browse files
committed
Merge pull request #82 from hailtonsilva/patch-2
Show the login form only for guest users
2 parents de84422 + bdf17d8 commit fdd418e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/Controllers/AuthController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ public function __construct(UserRepositoryInterface $users)
3838
*/
3939
public function getLogin()
4040
{
41-
$this->view('home.login');
41+
if (Auth::guest()) {
42+
return $this->view('home.login');
43+
}
44+
return $this->redirectIntended(route('user.index'));
4245
}
4346

4447
/**

0 commit comments

Comments
 (0)