GetAllUsers() public static method

public static GetAllUsers ( ) : System.Web.Security.MembershipUserCollection
return System.Web.Security.MembershipUserCollection
Beispiel #1
0
 public IEnumerable <UserDetails> GetUsers()
 {
     return(UserManager.GetAllUsers().Cast <MembershipUser>().Select(user => new UserDetails
     {
         Name = user.UserName,
         Roles = string.Join(", ", Roles.GetRolesForUser(user.UserName)),
         Locked = user.IsLockedOut,
         Online = user.IsOnline
     }));
 }
Beispiel #2
0
 public IEnumerable <UserDetails> GetUsers()  // TODO: Следует исключить вошедшего
 {
     return(UserManager.GetAllUsers().Cast <MembershipUser>().Select(user => new UserDetails
     {
         Name = user.UserName,
         Email = user.Email,
         Roles = string.Join(", ", Roles.GetRolesForUser(user.UserName)),
         Locked = user.IsLockedOut,
         Online = user.IsOnline
     }));
 }