Changeset 184
- Timestamp:
- Dec 31, 2007, 3:20:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/register.php
r178 r184 15 15 function doregister(){ 16 16 global $lang_global, $realm_db, $disable_acc_creation, $limit_acc_per_ip, $valid_ip_mask, 17 $send_mail_on_creation, $create_acc_locked, $from_mail, $mailer_type, $smtp_cfg, $title ;17 $send_mail_on_creation, $create_acc_locked, $from_mail, $mailer_type, $smtp_cfg, $title, $MaximumAccountCount; 18 18 19 19 if ( empty($_POST['pass']) || empty($_POST['email']) || empty($_POST['username']) ) { 20 20 redirect("register.php?err=1"); 21 21 } 22 23 $sql = new SQL; 24 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 25 26 $result = $sql->query("SELECT COUNT(*) FROM account"); 27 $AccountCount = $sql->result($result, 0, 'COUNT(*)'); 28 if($AccountCount >= $MaximumAccountCount) redirect("register.php?err=4"); 22 29 23 30 if ($disable_acc_creation) redirect("register.php?err=4"); … … 300 307 $body = str_replace("<password>", substr(sha1(strtoupper($user_name)),0,7), $body); 301 308 $body = str_replace("<activate_link>", 302 $_SERVER['HTTP_HOST']. "/register.php?action=do_pass_activate&h=".$sql->result($result, 0, 'I')."&p=".substr(sha1(strtoupper($user_name)),0,7), $body);309 $_SERVER['HTTP_HOST'].substr($_SERVER["SCRIPT_NAME"], 0, strrpos($_SERVER["SCRIPT_NAME"], '/'))."/register.php?action=do_pass_activate&h=".$sql->result($result, 0, 'I')."&p=".substr(sha1(strtoupper($user_name)),0,7), $body); 303 310 $body = str_replace("<base_url>", $_SERVER['HTTP_HOST'], $body); 304 311
Note:
See TracChangeset
for help on using the changeset viewer.