GetAllUsers() public static method

public static GetAllUsers ( ) : System.Web.Security.MembershipUserCollection
return System.Web.Security.MembershipUserCollection
コード例 #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
     }));
 }
コード例 #2
0
ファイル: Manage.aspx.cs プロジェクト: vsisdead/DotNetAppDev
 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
     }));
 }