Warning! The code will fail in some cases (General)

by Auge, Thursday, July 23, 2009, 10:24 (5400 days ago) @ hunter

Hello

find code into file: register.inc.php
change from
$lang['new_user_email_txt'] = str_replace("[activate_link]", $settings['forum_address'] ."index.php?mode=register&id=".$new_user_id."&key=".$activate_code, $lang['new_user_email_txt']);

to:

$lang['new_user_email_txt'] = str_replace("[activate_link]","http://". $_SERVER['SERVER_NAME'] ."/index.php?mode=register&id=".$new_user_id."&key=".$activate_code, $lang['new_user_email_txt']);

What's the reason to do it?

if you have sub subfolder "forum" you just to add "forum in to link here like:
fisrt into line here:
"/forum/index.php?mode=register&id=".......
so you know what to do ?

I know what to do. And again: What's the reason to do it?

The variable $settings['forum_address'] contains exactly the information of $_SERVER['SERVER_NAME'] and the local path to the forum wich you want me to add by hand. So why should I change to your solution if $settings['forum_address'] contains all needed information?

Is it possible that you used $settings['forum_address'] the wrong way?

Tschö, Auge


Complete thread:

 RSS Feed of thread