Developer forum

Forum » CMS - Standard features » Inactive for x days

Inactive for x days

Khaing May Thaw
Reply

Hi all,

 

 

Can we have this kind of user scenario?

 

The account will be inactive for 90 days. After 90 days, the user account will change to inactive automatically.

 

 

Best Regards,

May Thaw.


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi May Thaw,

 

Is this what you are looking for?

https://doc.dynamicweb.com/documentation-9/users/user-management/users#8073

 

You can set it there, or if you are using integration, you can set that value directly on the database.

 

Best Regards,

Nuno Aguiar

 
Khaing May Thaw
Reply

Dear Nuno,

 

The scenario what I meant is that the user's account will be deactivated if user wouldn't log into the system during 90 days.

After 90 days, the account will be deactivated.

 

Publication period, that we need to set up the date and time manually.

 

 

Best Regards,

May Thaw.

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi May Thaw,

 

There's no configuration to do so, but with some custom development you can. There are 2 ways to do so:

  • A Login notification subscriber to check whether or not to login the user - OnBeforeExtranetLogin
  • A Scheduled task that runs a method to turn any user that hasn't logged in for 90 days - OnBeforeExtranetLogin

 

Hope that makes sense,

Nuno Aguiar

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi May Thaw,

Alternatively you can configure an "Inactive users" smart search in user management where you add a filter on "Last login time", "Before", "@Code(System.DateTime.Today.AddDays(-90))" (custom date).

You can use this smart search to bulk update the inactive users (select all, right click, deactivate selected).

Optionally you can create a user group which is based on that smart search and then configure permissions to prevent these users from logging in.

Best regards,
Morten

 

You must be logged in to post in the forum