Contact creator - update contact after user update - Joomla! Forum - community, help and support
question: how trigger contact creator?
background: client needs
* user (=member) registration in front end
* user profile fields
* list of members
almost working using standard joomla code:
1) user creates new user account (default login module)
2) user fills user profile (default user profile plugin)
3) new contacts created (default contact creator)
4) member can listed in front end (default contact list)
5) clicking member user details provided (default contacts). contact form can submitted.
6) after login user can edit own user profile (default login module)
re. 3: after little hacking more user profile data transferred contact. can editing file plugins/user/contactcreator/contactcreator.php (found no way override plugin file). around line 81 insert new code:
now user can create new account exteded profile details , new contact created these details.
but: when user later edits user profile, contact details not updated. how make happen?
background: client needs
* user (=member) registration in front end
* user profile fields
* list of members
almost working using standard joomla code:
1) user creates new user account (default login module)
2) user fills user profile (default user profile plugin)
3) new contacts created (default contact creator)
4) member can listed in front end (default contact list)
5) clicking member user details provided (default contacts). contact form can submitted.
6) after login user can edit own user profile (default login module)
re. 3: after little hacking more user profile data transferred contact. can editing file plugins/user/contactcreator/contactcreator.php (found no way override plugin file). around line 81 insert new code:
code: select all
//original code
$contact->name = $user['name'];
$contact->user_id = $user_id;
$contact->email_to = $user['email'];
$contact->catid = $category;
//new code
$contact->address = ($user['profile']['address1']);
$contact->postcode = ($user['profile']['postal_code']);
$contact->suburb = ($user['profile']['city']);
$contact->country = ($user['profile']['country']);
$contact->telephone = ($user['profile']['phone']);
$contact->webpage = ($user['profile']['website']);
now user can create new account exteded profile details , new contact created these details.
but: when user later edits user profile, contact details not updated. how make happen?
Comments
Post a Comment