Manually Authenticating Users and Ban function not working
up vote
0
down vote
favorite
I am using laravel 5.2 and I wrote this function in the AuthController but it doesn't work at all
public function authenticate()
{
if (Auth::attempt(['email' => $email, 'password' => $password, 'active' => 1])) {
// The user is active, not suspended, and exists.
return redirect()->intended('/');// return $next($request);
}
else {
return redirect('/login');// return response('Unauthorized.', 401);
}
}
what is the wrong with it
authentication login
add a comment |
up vote
0
down vote
favorite
I am using laravel 5.2 and I wrote this function in the AuthController but it doesn't work at all
public function authenticate()
{
if (Auth::attempt(['email' => $email, 'password' => $password, 'active' => 1])) {
// The user is active, not suspended, and exists.
return redirect()->intended('/');// return $next($request);
}
else {
return redirect('/login');// return response('Unauthorized.', 401);
}
}
what is the wrong with it
authentication login
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am using laravel 5.2 and I wrote this function in the AuthController but it doesn't work at all
public function authenticate()
{
if (Auth::attempt(['email' => $email, 'password' => $password, 'active' => 1])) {
// The user is active, not suspended, and exists.
return redirect()->intended('/');// return $next($request);
}
else {
return redirect('/login');// return response('Unauthorized.', 401);
}
}
what is the wrong with it
authentication login
I am using laravel 5.2 and I wrote this function in the AuthController but it doesn't work at all
public function authenticate()
{
if (Auth::attempt(['email' => $email, 'password' => $password, 'active' => 1])) {
// The user is active, not suspended, and exists.
return redirect()->intended('/');// return $next($request);
}
else {
return redirect('/login');// return response('Unauthorized.', 401);
}
}
what is the wrong with it
authentication login
authentication login
asked Nov 7 at 21:36
Andre
63
63
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53198200%2fmanually-authenticating-users-and-ban-function-not-working%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown