Extend User Properties

Gurus,

What's the best way to extend user and roles property ?

One of our clients need Active status on User ( Scheduling don't work in this case )

Being said that i can just trigger the "Lockout" for the user so that he cannot login or do any of the activities, but was wondering what's the best way to implement.

  1. can we somehow extend the user management as a new module ?
  2. If step 1 is not recommended, I think I have to create a login page check if the user is in "active" status (some db operation ) and then finally login ?

Regards

1 Like

Hi Subin,

The first thing that comes to mind is to use the Database User Source. This will give you a ton of flexibility - you can even create your own tables where the user information will be stored, and from there, you can have a StatusID column to another table, or a simple IsActive column to tell if this user is active.

Then, in your queries that you specify for the DB User Source, you can control the behavior you describe there. For instance, you can set the authentication query to something like

SELECT 
    * 
FROM dbo.User 
WHERE Username = ? 
    AND Password = ? 
    AND IsActive = 1

If you don't wish to create all of the tables required for user management, you can simply choose the Automatic mode and the appropriate tables will be created for you in the Database connection you specify. Then you can modify those queries once you get the table structure in place.

1 Like

Thanks for the message @flexware and this sounds like a proper plan here(to modify the database user source) , but I am afraid if get the "Login failed. Please try again." generic message but instead I want to give user a proper message "account not activated, please contact administrator" , so for these scenarios i think its better to create a different login page. or is there any other routes you think of @flexware

Regards

A generic message is deliberate, and necessary to avoid giving useful information to attackers. When login fails, it must not indicate why.

5 Likes