OnDemand Users Group

Support Forums => CMOD for Multiplatforms => Topic started by: fnb4321 on September 28, 2016, 01:39:28 PM

Title: Disabled Users Reporting
Post by: fnb4321 on September 28, 2016, 01:39:28 PM
 If you set a User Inactivity value under Login Information in the System Parameters is there a way to produce a report of disabled users in case you wanted to delete the disabled users ?
Title: Re: Disabled Users Reporting
Post by: B.Rivers on October 21, 2016, 07:38:22 PM
Hello,

I run query again the DB (Oracle) Like this:

select USERID,NAME,last_login_DT,UpD_DT,last_login_DT,admin
FROM ARSUSER
where ADMIN=8448  --disabled  users
Title: Re: Disabled Users Reporting
Post by: B.Rivers on November 22, 2016, 12:15:12 AM
Thanks very helpful
Title: Re: Disabled Users Reporting
Post by: Justin Derrick on November 22, 2016, 02:54:57 PM
Aside from B. Rivers replying to himself, there's another minor snag...

The 8448 number is dependent on which version of CMOD you're on.  The problem is that it's a vectored field, and the 'bit' that determines if the user is disabled isn't easily accessible from inside the database.  You'll probably want to modify the select to read "ADMIN in (256,8448)", although this will not catch all of the combinations and permutations.

-JD.
Title: Re: Disabled Users Reporting
Post by: Alessandro Perucchi on January 23, 2017, 10:31:11 AM
I agree 100% with Justin, if you don't know how the CMOD database is structure, I WILL NEVER use such already made, and most probably wrong SQL.
CMOD use bits in its database field in order to define what needs to be done.

Maybe in your case the bit 256, or 8196 was the one setting the disable flag. If it was 8196, then with your query you will miss 8196+1, 8196+2, 8196+4, etc...

So please if you don't know what you are doing, don't query the database .... use arsxml instead, that way you will be future proof