Changeset 178 for minimanager/register.php
- Timestamp:
- Dec 23, 2007, 2:55:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/register.php
r147 r178 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 , $MaximumAccountCount;17 $send_mail_on_creation, $create_acc_locked, $from_mail, $mailer_type, $smtp_cfg, $title; 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");29 22 30 23 if ($disable_acc_creation) redirect("register.php?err=4"); … … 307 300 $body = str_replace("<password>", substr(sha1(strtoupper($user_name)),0,7), $body); 308 301 $body = str_replace("<activate_link>", 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);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); 310 303 $body = str_replace("<base_url>", $_SERVER['HTTP_HOST'], $body); 311 304
Note:
See TracChangeset
for help on using the changeset viewer.