Trigger to create a new page after user logs in

(Margaret Chidgey) #1

Matrix Version:
I’m trying to create a section of our website for training.
I’ve set up a separate Account manager page, and trainees can log in to create an account.
They are set up as a backend user in a specific user group with permissions to access only a single folder.
Since they have not done any training yet, I want a page to be created for them with their name.
I have set up a trigger action so that:
After user logs in
AND user is a backend user
AND user is a member of a particular user group
Create a new page with Name-text = %globals_user_attribute_first_name% IN a specific folder

This all works well, however, when the user logs in again, another new page is created with their name.

How can I set this to happen only once? I have tried adding a Set Future status action to move them to a different user group 2 minutes after they log in, but this just isn’t working (ie nothing happens and they are not moved to the new group).

Is there any other way I can do this so that it will work?
Thanks in advance!

(Tarman) #2


There may be different ways to do this.

What I can think now is:

  • Apply metadata schema to the newly created user which you can set from Account Manager
  • This metadata schema must have one Metadata Select Field (i.e named it FirstTimeLoggedIn) whose style could be checkbox and option value can be set to ‘0’ = FALSE and ‘1’ = TRUE. So if user is not LoggedIn, value is set to 0 by default at the time of creating a user. And when user logged in for the first time this value can be change to 1.
  • You can now add one more trigger condition i.e Metadata Value. So trigger will only be fired when metadata value exactly match with 0 and new standard page is created. Also in trigger action you need to add one more action that update the metadata value to 1