GetUserDetail() public method

Returns the detail of a given user based on supplied UserId
public GetUserDetail ( int userId ) : UserProfile
userId int Unique id identifying the user
return UserProfile
Exemplo n.º 1
0
 // TODO: Remember to refactor code!!!
 public UserIdentity(int userId, UserAccountService service, UserInfo userInfo, string store, string application)
 {
     //Assign the incoming user name to the current one and clear the roles collection
     var user = service.GetUserDetail(userId);
     this.userName = user.UserName;
     this._profile = userInfo;
     this.roles.Clear();
     authenticated = true;
     /* Retrive the list of all authorized Tasks and Operations from NetSqlAzMan database
      * and persist it with the roles arraylist collection
      */
     roles.AddRange(service.GetUserPermissions(userInfo.UserName, "CATS", application));
 }
Exemplo n.º 2
0
        // TODO: Remember to refactor code!!!
        public UserIdentity(int userId, UserAccountService service, UserInfo userInfo, string store, string application)
        {
            //Assign the incoming user name to the current one and clear the roles collection
            var user = service.GetUserDetail(userId);

            this.userName = user.UserName;
            this._profile = userInfo;
            this.roles.Clear();
            authenticated = true;

            /* Retrive the list of all authorized Tasks and Operations from NetSqlAzMan database
             * and persist it with the roles arraylist collection
             */
            roles.AddRange(service.GetUserPermissions(userInfo.UserName, "CATS", application));
        }