Commit 2deefeeb authored by quentin.vrel's avatar quentin.vrel
parents 0431460b 707aa1ff
......@@ -54,7 +54,14 @@ class LoginController extends Controller
$jwt = JWT::encode($token, JWT_BACKEND_KEY);
$jsonResult = json_encode(
array(
"jwt_token" => $jwt
"jwt_token" => $jwt,
"id_user" => $user->id(),
"id_role" => $user->role(),
"login" => $user->login(),
"avatar" => $user->avatar(),
"lastname" => $user->lastname(),
"firstname" => $user->firstname(),
"mail" => $user->email()
)
);
......
......@@ -55,6 +55,10 @@ class User extends Model
{
return trim($this->ID_ROLE);
}
public function login()
{
return trim($this->LOGIN);
}
public function password()
{
return trim($this->PASWORD);
......
......@@ -8,4 +8,4 @@ export default class User {
this.firstname = firstname;
this.mail = mail;
}
}
\ No newline at end of file
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment