- Timestamp:
- Oct 19, 2006, 11:33:43 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/config_default.inc.php
r1565 r1566 502 502 $conf['nbm_treatment_timeout_default'] = 20; 503 503 504 // Send an email to the webmaster when a new user registers 505 $conf['email_admin_on_new_user']=false; 506 504 507 // +-----------------------------------------------------------------------+ 505 508 // | Set default admin layout | -
trunk/include/functions_url.inc.php
r1562 r1566 53 53 54 54 /** 55 * returns the url of the current host (e.g. http://www.toto.com ) 56 * TODO: if required by someone, treat https case 57 */ 58 function get_host_url() 59 { 60 $url = "http://"; 61 $url .= $_SERVER['HTTP_HOST']; 62 if ($_SERVER['SERVER_PORT']!=80) 63 { 64 $url .= ':'.$_SERVER['SERVER_PORT']; 65 } 66 return $url; 67 } 68 69 /** 55 70 * adds one or more _GET style parameters to an url 56 71 * example: add_url_params('/x', array('a'=>'b')) returns /x?a=b -
trunk/register.php
r1565 r1566 49 49 { 50 50 $user_id = get_userid($_POST['login']); 51 log_user( $user_id, false); 52 53 if ($conf['email_admin_on_new_user']) 54 { 55 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 56 $username = $_POST['login']; 57 $admin_url = get_host_url().cookie_path() 58 .'admin.php?page=user_list&username='.$username; 59 60 $content = 61 'User: '.$username."\n" 62 .'Mail: '.$_POST['mail_address']."\n" 63 .'IP: '.$_SERVER['REMOTE_ADDR']."\n" 64 .'Browser: '.$_SERVER['HTTP_USER_AGENT']."\n\n" 65 .l10n('admin').': '.$admin_url; 66 67 pwg_mail( get_webmaster_mail_address(), '', 68 'PWG '.l10n('register_title').' '.$username, 69 $content 70 ); 71 } 51 72 redirect(make_index_url()); 52 73 }
Note: See TracChangeset
for help on using the changeset viewer.