Revision 1810
Added by Dietmar about 12 years ago
save_signup.php | ||
---|---|---|
117 | 117 |
msgQueue::add($MESSAGE['LOGIN_USERNAME_BLANK']); |
118 | 118 |
} |
119 | 119 |
|
120 |
// check that display_name is unique in whoole system (prevents from User-faking) |
|
121 |
$sql = 'SELECT COUNT(*) FROM `'.TABLE_PREFIX.'users` '; |
|
122 |
$sql .= 'WHERE `user_id` <> '.(int)$admin->get_user_id().' AND `display_name` LIKE "'.$wb->get_session('DISPLAY_NAME').'"'; |
|
123 |
if( ($iFoundUser = intval($database->get_one($sql))) > 0 ){ |
|
124 |
msgQueue::add($MESSAGE['USERS_USERNAME_TAKEN'].' ('.$TEXT['DISPLAY_NAME'].')'); |
|
125 |
$_SESSION['DISPLAY_NAME'] = ''; |
|
126 |
} else { |
|
127 |
if($wb->get_session('DISPLAY_NAME') == '') { |
|
128 |
msgQueue::add($MESSAGE['GENERIC_FILL_IN_ALL'].' ('.$TEXT['DISPLAY_NAME'].')'); |
|
129 |
} |
|
130 |
} |
|
131 |
|
|
120 | 132 |
if($wb->get_session('EMAIL') != "") { |
121 | 133 |
// Check if the email already exists |
122 | 134 |
$sql = 'SELECT `user_id` FROM `'.TABLE_PREFIX.'users` WHERE `email` = \''.$_SESSION['EMAIL'].'\''; |
... | ... | |
133 | 145 |
msgQueue::add($MESSAGE['SIGNUP_NO_EMAIL']); |
134 | 146 |
} |
135 | 147 |
|
136 |
if($wb->get_session('DISPLAY_NAME') == "") { |
|
137 |
// $aErrorMsg[] = $MESSAGE['GENERIC_FILL_IN_ALL']; |
|
138 |
msgQueue::add($MESSAGE['GENERIC_FILL_IN_ALL'].' ('.$TEXT['DISPLAY_NAME'].')'); |
|
139 |
} |
|
148 |
// if($wb->get_session('DISPLAY_NAME') == "") {
|
|
149 |
//// $aErrorMsg[] = $MESSAGE['GENERIC_FILL_IN_ALL'];
|
|
150 |
// msgQueue::add($MESSAGE['GENERIC_FILL_IN_ALL'].' ('.$TEXT['DISPLAY_NAME'].')');
|
|
151 |
// }
|
|
140 | 152 |
|
141 | 153 |
if(CONFIRMED_REGISTRATION) { |
142 | 154 |
$iMinPassLength = 6; |
Also available in: Unified diff
! account signup check that display_name is unique in whole system
(prevents from User-faking)
! add POST Request to admintools