Last post Apr 24, 2006 11:11 AM by NDLanding
Apr 24, 2006 11:11 AM|NDLanding|LINK
I'd like to associate some additional information with a user once they have logged in. This additional information would be based on whether they are members of some particular role or not. For example, I currently have 3 additional roles (Role1, Role2,
Role3) set up. Any user who is a member of any of these roles should be able to see this one particular page I've set up on my site. Easy enough using DNN standard functionality. However what I'd like to do is depending on whether they are in Role1 or Role2
or Role3 I'd like to show them different data within one of my modules on that page. I 've developed the module already and it returns some data from a database table. Essentially I'd like to filter this data based on the users role. For example, if the user
is a member of Role1 they'd get to see data from a table where the value of some field is 'a', whereas if the user was a member of Role2 they'd get to see data from the table where the value of the same field is 'b' etc. Essentially what I want to do is find
out where the best place is to check which role they are in and where I might store the associated filter criteria for the duration of the session. Can you temporarily append information to some existing user object (- I don't want to have to change any DNN
core stuff), or should I be looking at using session variables. I'd like to achieve this in such a way that I'd only have to check their role once, then based on this get and store the filter criteria (this involves hitting the database for some information).
For all subsequent requests I could check for the existence of this filter criteria object/thingy and use this. I need to keep checking this filter criteria in order to configure my modules appearance as the user navigates from page to page.
PS I'm using DNN 3.x