Is this...
$params = array(
'sitename' => $settings->site_name,
'fname' => $userdetails->fname,
'lname' => $userdetails->lname,
'email' => rawurlencode($userdetails->email),
);
In the view in the usersc/scripts/during_user_creation?
05-29-2019, 11:55 AM
(This post was last modified: 05-29-2019, 11:56 AM by LBC.)
yes, and the other bit is in the _email_newuser.php
the whole thing:
$params = array(
'sitename' => $settings->site_name,
'fname' => $userdetails->fname,
'lname' => $userdetails->lname,
'email' => rawurlencode($userdetails->email),
);
$to = rawurlencode("my@email.com");
$subject = 'New Registration!';
$body = email_body('_email_newuser.php',$params);
email($to,$subject,$body);
Did you happen to have an idea why the above wont give me any of the details in that mail?
Sorry. I've been out of the office and will be a good bit this week. Before you call that function can you do
dnd($userdetails); to make sure that variable is set properly?
Like this?
dnd($userdetails);
$params = array(
'sitename' => $settings->site_name,
'fname' => $userdetails->fname,
'lname' => $userdetails->lname,
'email' => rawurlencode($userdetails->email),
);
$to = rawurlencode("my@email.com");
$subject = 'New Registration!';
$body = email_body('_email_newuser.php',$params);
email($to,$subject,$body);
06-05-2019, 11:37 AM
(This post was last modified: 06-05-2019, 11:39 AM by LBC.)
when i send the registration form it does go into the database, but the page says :
Notice: Undefined variable: userdetails in /www/usersc/scripts/during_user_creation.php on line 28
NULL
Line 28 being that line we just added.
And only the registrant gets an email.
$db->update('users',$theNewId,['phone'=>Input::get('phone')]);
$db->update('users',$theNewId,['challenges'=>Input::get('challenges')]);
$db->update('users',$theNewId,['membership'=>Input::get('membership')]);
$db->update('users',$theNewId,['orig_chos_day'=>Input::get('orig_chos_day')]);
$db->update('users',$theNewId,['message'=>Input::get('message')]);
$db->update('users',$theNewId,['ecname'=>Input::get('ecname')]);
$db->update('users',$theNewId,['ecphone'=>Input::get('ecphone')]);
dnd($userdetails);
$params = array(
'sitename' => $settings->site_name,
'fname' => $userdetails->fname,
'lname' => $userdetails->lname,
'email' => rawurlencode($userdetails->email),
'phone' => $userdetails->phone,
);
$to = rawurlencode("my@mail.com");
$subject = 'New Registration!';
$body = email_body('_email_newuser.php',$params);
email($to,$subject,$body);
Mudmin? I've been tinkering with this code myself for a while now, but i'm not getting anywhere. If you have some time, could you please have another look?