The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
e-mail not verifying
#11
(05-29-2019, 10:49 AM)mudmin Wrote: But do you have error reporting turned on in php.ini?

Oh, no I dont. Sorry. That is a piece of coding in the file...right?
  Reply
#12
So if you go to the dashboard, it will tell you where your php.ini file is under system snapshot. From there you want to make sure that display_errors = on
  Reply
#13
It just says: PHP 7.2.16, but I just switched error reporting on in the PHP options in my hosts dashboard. It takes a few minutes to show up. Ill do another test when it does Smile
  Reply
#14
Ok. Sounds good. Normally right before the version number it has the actual path to php.ini
  Reply
#15
I did another test and this is the error message:

Parse error: syntax error, unexpected '<', expecting end of file in /www/usersc/scripts/during_user_creation.php on line 28

On line 28 the <?php tag is located
  Reply
#16
What's the line before that?
Error reporting really helps Smile
  Reply
#17
20 $db->update('users',$theNewId,['phone'=>Input::get('phone')]);
21 $db->update('users',$theNewId,['challenges'=>Input::get('challenges')]);
22 $db->update('users',$theNewId,['membership'=>Input::get('membership')]);
23 $db->update('users',$theNewId,['orig_chos_day'=>Input::get('orig_chos_day')]);
24 $db->update('users',$theNewId,['message'=>Input::get('message')]);
25 $db->update('users',$theNewId,['ecname'=>Input::get('ecname')]);
26 $db->update('users',$theNewId,['ecphone'=>Input::get('ecphone')]);
27
28 <?php

$params = array(
'sitename' => $settings->site_name,
);
$to = rawurlencode("my@emailaddress.com");
$subject = 'You got a new user!';
$body = email_body('_email_newuser.php',$params);
email($to,$subject,$body);

?>
  Reply
#18
So you're already in php, which means you don't need <?php on line 28. Just delete it.
  Reply
#19
okay...now the registration is okay AND i received an e-mail saying i have a new user! Yay Big Grin 

Very cool. Can I show the registrants details in that e-mail as well?

And...like i said before...now there is that new file (_email_newuser.php) in the users instead of the usersc. Will that not cause problems?
  Reply
#20
Awesome. Glad it is working.

Don't worry about the views thing being in users. That feature dates back to UserSpice 2.0, so all email views are just stored in that folder.

So, to include more info in your email, 2 things need to happen.

1. You have to add the variables that you want to add in that params array. You can see the full example in one of the earliest messages in this thread, but for instance, if you want the email, you can add this to $params.
'email' => rawurlencode($userdetails->email),

2. Then, whatever is on the left side of the array is the variable name inside the email, so we just added 'email' which means you change the body of users/views/_email_newuser.php to something like

<p>You just got a new user on <?=$sitename?>. Their email address is <?=$email?></p>

Make sense?
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)