AddUserToRole() public static method

public static AddUserToRole ( System.Guid UserId, string roleName ) : bool
UserId System.Guid
roleName string
return bool
Ejemplo n.º 1
0
 public bool AddToRole(string roleName)
 {
     if (!SecurityData.IsUserInRole(this.UserName, roleName))
     {
         SecurityData.AddUserToRole(this.UserName, roleName);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 2
0
 public bool AddToRole(string roleName)
 {
     return(SecurityData.AddUserToRole(this.UserName, roleName));
 }