I am writing a very siimple module that does the following:
1) Display a button that says "I AGREE TO TERMS."
2) Upon click, it ass a new role to your user profile.
3) If the module is loaded again it show "YOU HAVE ALREADY AGREED TO THESE TERMS." instead of the button.
However, it appears I am too much of a n00blet to figure this out. What happens is the module checks to see if you are a member of the role and decides whether or not to show the button or the text.
When logged in has host or admin, everything works fine.
Here is the code:
Dim objSecurity As PortalSecurity
Dim isSeller As Boolean
If objSecurity.IsInRole(CType(Settings("Sellers"), String)) Then
isSeller = True
End If
If isSeller = True Then
AgreedText.Visible = True
NotAgreedText.Visible = False
Else... blah blah
I set the module cache value to -1 and that did not seem to help either. The user is most definately being added to the role though. Again, under the admin account, the module works as expected and shows the button or text approriately. Which I find baffling.
Thanks,
Mike