From 9c501dbf9f4f39f41428fb72289783124aaf7c28 Mon Sep 17 00:00:00 2001 From: sylvainlap Date: Mon, 2 Feb 2015 16:54:09 +0100 Subject: [PATCH] Auth service --- .../services/authentication.client.service.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/modules/users/client/services/authentication.client.service.js b/modules/users/client/services/authentication.client.service.js index 2cbe0d8716..8eadf2c06f 100644 --- a/modules/users/client/services/authentication.client.service.js +++ b/modules/users/client/services/authentication.client.service.js @@ -1,15 +1,12 @@ 'use strict'; // Authentication service for user variables -angular.module('users').factory('Authentication', [ - - function() { - var _this = this; - - _this._data = { - user: window.user +angular.module('users').factory('Authentication', ['$window', + function($window) { + var auth = { + user: $window.user }; - return _this._data; + return auth; } -]); \ No newline at end of file +]);