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
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
e-mail not verifying - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.4 (https://userspice.com/forums/forumdisplay.php?fid=27)
+--- Thread: e-mail not verifying (/showthread.php?tid=1502)

Pages: 1 2 3 4


RE: e-mail not verifying - LBC - 05-29-2019

(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?


RE: e-mail not verifying - mudmin - 05-29-2019

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


RE: e-mail not verifying - LBC - 05-29-2019

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


RE: e-mail not verifying - mudmin - 05-29-2019

Ok. Sounds good. Normally right before the version number it has the actual path to php.ini


RE: e-mail not verifying - LBC - 05-29-2019

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


RE: e-mail not verifying - mudmin - 05-29-2019

What's the line before that?
Error reporting really helps Smile


RE: e-mail not verifying - LBC - 05-29-2019

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);

?>


RE: e-mail not verifying - mudmin - 05-29-2019

So you're already in php, which means you don't need <?php on line 28. Just delete it.


RE: e-mail not verifying - LBC - 05-29-2019

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?


RE: e-mail not verifying - mudmin - 05-29-2019

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?