Hook not updating Login field from Email Address
Content
Hello you beautiful people,
I have a need to force the contact's specified primary email address as the Login. I've done some research and found some great posts. I used the code, and it did not execute from what I can tell. I adapted it and tinkered further, and I still can't seem to figure out what I'm doing wrong. Could anyone point me in the right direction?
From hooks.php:
$rnHooks['post_contact_create'] = array(
'class' => 'ContactModel',
'function' => 'setLoginforcontact',
'filepath' => ''
);
$rnHooks['post_contact_update'] = array(
'class' => 'ContactModel',
'function' => 'setLoginforcontact',
'filepath' => ''
From ContactModel.php
<?php
namespace Custom\Models;
0