Background: A client needs
* user (=member) registration in front end
* extra user profile fields
* list of members
Almost working now by using standard Joomla code:
1) User creates new user account (default login module)
2) User fills user profile (default user profile plugin)
3) A new contacts is created (default contact creator)
4) Member can be listed in front end (default contact list)
5) By clicking a member user details are provided (default contacts). Contact form can be submitted.
6) After login user can edit own user profile (default login module)
Re. 3: After a little hacking more user profile data is transferred to the contact. You can do so by editing the file plugins/user/contactcreator/contactcreator.php (found no way to override this 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']);
BUT: When user later edits his user profile, the contact details are not updated. How to make this happen?