A user pattern is a way to automatically fill some fields when creating a user. Any pattern is bound to a domain and can only be used into this domain. All patterns of the global domain are cloned into any newly created domain.
The userpattern module allows standard CRUD operations on user patterns.
The user pattern create/update form looks like the user's one.
Depending on the type of the field, different values can be used :
A pattern is bound to a domain. A pattern owns a title and a description. A pattern owns the list of user attributes (except ignored ones) and the way to fill them.
Database storage:
userpattern {
id
domain_id
timeupdate
timecreate
userupdate
usercreate
title
description
}
+ key/value table to store each attribute :
userpattern_property {
userpattern_id
attribute
value
}
A new select field allow to choose the pattern to apply.
As soon as a pattern is applied, the concerned fields are automatically filled. When editing any field, depending fields are modified “in live”. Eg: The login is automatically modified when the user lastname has changed.
User specific
Kind %kind% Lastname %lastname% Firstname %firstname% Login %login% Profile %profile% Delegation %delegation% Delegation Target %delegation_target% Title %title%
Contact informations
Phone number %phone% Phone 2 %phone2% Mobile phone %mobile% Fax %fax% Fax 2 %fax2% Company %company% Direction %direction% Service %service% Address 1 %ad1% Address 2 %ad2% Address 3 %ad3% Zip code %zip% City %town% Express code %cdx%
Description
Description %desc%
Extra
Today's date %today% In x days %today+x% x days ago %today-x% The domain name %domain% Generate a password %random% (only usable into the password field)
Specific fields can be used when editing a user pattern.