dist/origin-web-common-services.js
function() {
        var user = userStore.getUser();
        if (user) {
          $rootScope.user = user;
          authLogger.log('AuthService.withUser()', user);
          return $q.when(user);
        } else {
          authLogger.log('AuthService.withUser(), calling startLogin()');
          return this.startLogin();
        }
      }
function() {
        var user = userStore.getUser();
        if (user) {
          $rootScope.user = user;
          authLogger.log('AuthService.withUser()', user);
          return $q.when(user);
        } else {
          authLogger.log('AuthService.withUser(), calling startLogin()');
          return this.startLogin();
        }
      }
function ( ) { var user = userStore . getUser ( ) ; if ( user ) { $rootScope . user = user ; authLogger . log ( 'AuthService.withUser()' , user ) ; return $q . when ( user ) ; } else { authLogger . log ( 'AuthService.withUser(), calling startLogin()' ) ; return this . startLogin ( ) ; } }
Returns a promise of a user, which is resolved with a logged in user. Triggers a login if needed.
Returns a promise of a user which is resolved with a logged in user . Triggers a login if needed .