Create user feature and populate user's informations from CAS attributes

Hello,

For my needs, I develop create user feature. I permit to populate user's information from CAS attributes and defaults values specify in configuration (in "default_attrs" key). CAS attributes are mapped with SugarCRM attributes by using array "attrs_map" of configuration. I also permit to defined default preferences from configuration using key "default_prefs" (useful to define default timezone of new user). This new feature could be enable or disable by configuration key "createUser". Another configuration key "updateUser" permit to enable user's informations update after each successful connection.

Remark : Default attributes and preference are only define for new user (not during update).

Regards,

Benjamin