Changeset 169
- Timestamp:
- 12/22/06 16:09:16 (2 years ago)
- Files:
-
- wifidog/wifidog-auth/wifidog/signup.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wifidog/wifidog-auth/wifidog/signup.php
r145 r169 146 146 147 147 /** 148 * Validate RealName 148 * Validate field 149 * 150 * @param string $field 151 * @param string $errmsg 152 153 * return void 154 * 155 * @throws Execption if no field value was given 149 156 * 150 157 **/ 158 function validate_field($field,$errmsg) 159 { 160 if (!isset($field) || !$field) { 161 throw new Exception(_($errmsg)); 162 } 163 } 164 165 /** 166 * Validate certification honnor 167 **/ 168 function validate_honnor($certifhonnor) 169 { 170 if (!isset($certifhonnor) || $certifhonnor == 0) { 171 throw new Exception(_("Vous devez certifié votre déclaration.")); 172 } 173 } 151 174 152 175 /** … … 173 196 $password_again = trim($_REQUEST['password_again']); 174 197 $realname = trim($_REQUEST['realname']); 175 $ age = trim($_REQUEST['age']);198 $birthday = trim($_REQUEST['birthday']); 176 199 $address = trim($_REQUEST['address']); 177 200 $postalcode = trim($_REQUEST['postalcode']); … … 183 206 $smarty->assign('email', $email); 184 207 $smarty->assign('realname', $realname); 185 $smarty->assign(' age', $age);208 $smarty->assign('birthday', $birthday); 186 209 $smarty->assign('address', $address); 187 210 $smarty->assign('postalcode', $postalcode); … … 223 246 // Validate entered values 224 247 validate_username($username); 248 validate_field($realname,"A realname is required."); 225 249 validate_email($email); 226 250 validate_passwords($password, $password_again); 251 validate_field($birthday,"A birthday date is required."); 252 validate_field($address,"An address is required."); 253 validate_field($postalcode,"A postal code is required."); 254 validate_field($city,"A city is required."); 255 validate_field($country,"A country is required."); 256 validate_field($phone,"A phone number is required."); 257 validate_honor($certifhonnor); 227 258 228 259 // Check if user exists … … 236 267 237 268 // Create user and send him the validation email 238 $created_user = User::createUser(get_guid(), $username, $network, $email, $password );269 $created_user = User::createUser(get_guid(), $username, $network, $email, $password, $realname, $age, $address, $postalcode, $city, $country, $phone); 239 270 $created_user->sendValidationEmail(); 240 271
