Add user id to profile object

This commit is contained in:
Johannes Zellner
2015-10-28 22:07:30 +01:00
parent 954bb7039c
commit 6b6e417435

View File

@@ -61,6 +61,7 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
this._configListener = [];
this._readyListener = [];
this._userInfo = {
id: null,
username: null,
email: null,
admin: false
@@ -122,6 +123,7 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
Client.prototype.setUserInfo = function (userInfo) {
// In order to keep the angular bindings alive, set each property individually
this._userInfo.id = userInfo.id;
this._userInfo.username = userInfo.username;
this._userInfo.email = userInfo.email;
this._userInfo.admin = !!userInfo.admin;