Disable users after specified date

Build 1501 on 14/Nov/2017  This topic last edited on: 13/Sep/2015, at 15:03

Here's a sample configuration to make the users referencing a securityScope to be disabled after a certain date (stored in an attribute of the user object).

Important note

You must never disable the Administrator user.

Step-by-step

1.Add an attribute named expirationDate to the user object in the schema (and reimport it)

<xs:attribute name="expirationDate" type="xs:dateTime" use="optional"></xs:attribute>

2.Create a workflow that disables the given users:
Click to toggle expandCode

 

3.Create the expirationRule:

expiration1_zoom80

4.Create a partition referencing the newly created expiration rule:

expiration2_zoom61

5.Create a security scope referencing the newly created partition.
Click to toggle expandCode
5.Create a user referencing the security scope:
Click to toggle expandCode

 

The expirationDate can be modified in the "edit user" window.

expiration3_zoom60

The Back4 cleanup process will execute the DisableUser workflow for every user with an expirationDate in the past.