Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ceb18c42
authored
Aug 14, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update of user data after submission
parent
ceec4332
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
sails/src/assets/scripts/modules/login/controllers/login.js
sails/src/assets/scripts/modules/login/controllers/login.js
View file @
ceb18c42
...
...
@@ -62,7 +62,7 @@ function LoginCtrl(
.
success
(
function
(
data
)
{
$window
.
sessionStorage
.
token
=
data
.
token
;
//
User data correct
//User data correct
if
(
data
.
user
)
{
// Adapt language en-us to en-gb (the latter is the one supported for 'en')
if
(
data
.
user
.
lang
===
'en-us'
)
...
...
@@ -74,6 +74,9 @@ function LoginCtrl(
$location
.
path
(
'/sup/login'
);
}
// user is in the scope of the MainCtrl
$scope
.
user
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
user
));
$window
.
sessionStorage
.
user
=
JSON
.
stringify
(
data
.
user
);
$location
.
path
(
'/students'
);
})
...
...
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