Add login check

This commit is contained in:
manzerbredes 2016-03-20 11:23:06 +01:00
parent 0ce2b2fa30
commit 57006dba22
5 changed files with 44 additions and 33 deletions
client/js/services

View file

@ -27,9 +27,12 @@ mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){
&& typeof tokenPart_1InCookie !== 'undefined'
){
// If yes, put it into variables
angular.extend(profile, profileInCookie);
token=tokenPart_0InCookie+tokenPart_1InCookie;
if(token!==null){
// If yes, put it into variables
angular.extend(profile, profileInCookie);
token=tokenPart_0InCookie+tokenPart_1InCookie;
}
// Return I'm Login
return true;