You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Hook not updating Login field from Email Address

Accepted answer
16
Views
13
Comments
edited Jul 31, 2018 6:16PM in Customer Portal 13 comments

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;

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!