Remove Email Requirement - works in 2.0.18?


  -----  
Author Message

ali
Member

Wed Nov 16, 2005 2:03 pm   Post subject: Remove Email Requirement - works in 2.0.18?
Hi,
I moved my phpBB2 up to 2.0.18, and have tried to go back in and re-mod it so that it doesn't require an email address for users, and am having trouble. I installed this mod on 2.0.17 without issue, but I am now getting the following error message when I try to register a user without an email address:

Fatal error: Call to a member function on a non-object in [path]/phpBB2/includes/usercp_register.php on line 789


Here's the code in that area of my usercp_register.php file:

Code:

787            while ($row = $db->sql_fetchrow($result))
788            {
789               $emailer->from($board_config['board_email']);
790               $emailer->replyto($board_config['board_email']);
791               
792               $emailer->email_address(trim($row['user_email']));
793               $emailer->use_template("admin_activate", $row['user_lang']);
794               $emailer->set_subject($lang['New_account_subject']);
795
796               $emailer->assign_vars(array(
797                  'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
798                  'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
799
800                  'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
801               );
802               $emailer->send();
803               $emailer->reset();
804            }


The system will process a new registration like a charm as long as there is an email address in there, but if I leave it out, as the hack should allow, I get the fatal error. Since this worked for me in previous versions, and I have gone back and double-checked my work, I am wondering if 2.0.18 has something different going on that would not allow this hack to work...?

Thanks for any info!
 

Thoul
Administrator

Thu Nov 17, 2005 11:48 am   Post subject: re: Remove Email Requirement - works in 2.0.18?
Hm, actually I think it's just a bug in the hack that's never come up before. I bet you have admin activation of new registrations turned on. That seems to be where the error is coming up. I see another related problem or two now that I'm looking it over. I'll have to try to release an update soon.
 

Thoul
Administrator

Fri Nov 18, 2005 12:10 pm   Post subject: re: Remove Email Requirement - works in 2.0.18?
And now I have. Smile You can get a new version for phpBB 2.0.18 from here:
http://www.phpbbsmith.com/hacks/rer.php
 

ali
Member

Tue Nov 22, 2005 3:25 pm   Post subject:
Thanks SO much!!
 

IceSoulRo
Member

Mon Feb 06, 2006 6:55 pm   Post subject: re: Remove Email Requirement - works in 2.0.18?
I really tried but no luck Very Happy ...can you send me usercp_register.php modified by you pleaseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
it`s for phpBB-2.0.19 version pleaseeeeeeeeeee


helpppp (icesoul2004@gmail.com) 10x
 

Thoul
Administrator

Wed Feb 08, 2006 2:01 am   Post subject: re: Remove Email Requirement - works in 2.0.18?
Here you go:
http://www.phpbbsmith.com/files/usercp_register.txt
Keep in mind that this was a clean copy of the file. If you have any other hacks installed on your file, they would have to be reinstalled on this copy.
 

Page 1 of 1
Display posts from previous: