If you need to assign a Role to a user you can use this code:
Dim objRoleController As DotNetNuke.Security.Roles.RoleController
objRoleController = New DotNetNuke.Security.Roles.RoleController
objRoleController.AddUserRole(PortalId, User.UserID, RoleIdNumber, Null.NullDate, Null.NullDate)
Simple and working!
No comments:
Post a Comment