Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...User is not member rule solutionUser is not member rule solution
Previous
 
Next
New Post
11/17/2006 5:14 AM
 

Hello again :) Was on holiday for a while.

What do you mean when you say plug it into the scheduled jobs? Shouldn't this be event driven ?

I am going to attempt to create a module that will pick up all the roles from a specified Role Group. where the user can select one role to subscribe to and then remove the user from the registered role.

I will aim to make the Role Group and Registered Role dynmic so it can be changed through the settings section on the module.

If you have anything that can be usefull thus far it could be handy to look at.

Ta

 

 

 
New Post
11/21/2006 8:41 AM
 

Sorry about my late answer - was off-site.

Well, I thought that adding a job to the sql agent would be the best in this case, but you are right. Event driven would be the best where the event you'd want would be any change to a users role. I haven't gotten in to mod development yet so I haven't read up on what options are available in regards to events handling.

I did play around with it a bit though in the query analyzer ... maybe there are bits here you can use.

Did a script to list all users who are member of role1 AND role2 WHERE role2 is not expired (That is actually a quite important detail to include):

select ur.userid
from userroles ur1, roles r
where r.roleid=ur.roleid
and rolename='
role2'
and expiredate<Now
and exists (
select ur2.userid
from userroles ur2, roles r
where ur2.userid=ur1.userid
and r.roleid=ur2.roleid
and rolename='role1'
)
a friend played around with a bit to delete the roles not required for a user ... he's into Oracle, so it might contain syntax errors if run on MSSQL ...
 
delete from userroles where to_char(userid)||' '||to_char(roleid) in (
select to_char(ur.userid)||' '||to_char(roleid)
from userroles ur1, roles r
where r.roleid=ur.roleid
and rolename='
role2'
and expiredate<Now
and exists (
select ur2.userid
from userroles ur2, roles r
where ur2.userid=ur1.userid
and r.roleid=ur2.roleid
and rolename='role1'))
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...User is not member rule solutionUser is not member rule solution


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out