[page.noauth.login] fetch UID from login request
This commit is contained in:
parent
bb8a985db3
commit
0676b8d747
|
@ -42,13 +42,13 @@ gs.get.login.func.login = function(){
|
|||
api.call('GET /user/token', {}, function(rs){
|
||||
|
||||
// manage error
|
||||
if( rs.error !== 0 || rs.token == null )
|
||||
if( rs.error !== 0 || rs.token == null || rs.uid == null )
|
||||
return this.failed = true;
|
||||
|
||||
// store TOKEN + user data
|
||||
auth.token = rs.token;
|
||||
auth.user = {
|
||||
uid: null, // todo
|
||||
uid: rs.uid,
|
||||
username: username
|
||||
};
|
||||
document.location = '';
|
||||
|
|
Loading…
Reference in New Issue