Hi,
To correct the problem you have to edit file 'application/controllers/UserController.class.php' and change lines 191 to 196, from:
// if contact with same email exists use it as user's contact, without changing it
$contact = Contacts::getByEmail($user->getEmail(), true);
if ($contact instanceof Contact) {
$contact->setUserId($user->getId());
if ($contact->isTrashed()) $contact->untrash();
}
to:
$contact_id = array_var($user_data, 'contact_id');
$contact = Contacts::findById($contact_id);
if ($contact instanceof Contact) {
// user created from a contact
$contact->setUserId($user->getId());
$contact->save();
} else {
// if contact with same email exists use it as user's contact, without changing it
$contact = Contacts::getByEmail($user->getEmail(), true);
if ($contact instanceof Contact) {
$contact->setUserId($user->getId());
if ($contact->isTrashed()) $contact->untrash();
$contact->save();
}
}
For version 1.5 this will be corrected along some small improvements like updating the contacts email and company when you change them for the user, and how the username is generated when creating a user from a contact.
Cheers.