Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin Vrel
projet-cdaw
Commits
2deefeeb
Commit
2deefeeb
authored
Dec 03, 2020
by
quentin.vrel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gvipers.imt-lille-douai.fr/QVrel/projet-cdaw
parents
0431460b
707aa1ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
LoginController.class.php
BackEnd/src/controller/LoginController.class.php
+8
-1
User.class.php
BackEnd/src/model/User.class.php
+4
-0
user.js
frontend/src/model/user.js
+1
-1
No files found.
BackEnd/src/controller/LoginController.class.php
View file @
2deefeeb
...
...
@@ -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
()
)
);
...
...
BackEnd/src/model/User.class.php
View file @
2deefeeb
...
...
@@ -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
);
...
...
frontend/src/model/user.js
View file @
2deefeeb
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment