I like user to login by company name, username, and password - they need to enter all those fields.
username, and password fields are in the users table. 'company_name' are in the companies table.
username can be duplicated in the users table but each username is belong to different company name. company_id is defined in users table.
How can I Auth against company name, username, and password?
I had a look at the attemptLogin() method.
protected function attemptLogin(Request $request)
{
return $this->guard()->attempt(
$this->credentials($request), $request->has('remember')
);
}
I can't override this because I need to pass specific user that is belong to company then do auth check.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire