posted on January 25, 2020 10:11
Dim objRoleController As New RoleController
Dim arrRoles As String() = CType(objRoleController.GetUserRoles(Me.PortalId, Me.UserInfo.Username.ToString(), ""), String())
'objRoleController.GetRolesByUser(Me.UserId, Me.PortalId)
For Each role As String In arrRoles
If PortalSecurity.IsInRole(role) Then
objContentInfo = objContentController.Get(Me.ModuleId, role)
If Not (objContentInfo Is Nothing) Then
If (objContentInfo.SettingValue <> "") Then
Dim val As String = Server.HtmlDecode(objContentInfo.SettingValue)
If (Request.IsAuthenticated) Then
val = val.Replace("[FULLNAME]", Me.UserInfo.DisplayName)
val = val.Replace("[USERNAME]", Me.UserInfo.Username)
End If
literal.Text = val
phControls.Controls.Add(literal)
Return
End If
End If
End If
Next