Changeset 788 for trunk/app/controllers
- Timestamp:
- 10/01/08 20:21:44 (7 weeks ago)
- Location:
- trunk/app/controllers
- Files:
-
- 2 modified
-
confirms_controller.php (modified) (1 diff)
-
users_controller.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/confirms_controller.php
r785 r788 35 35 36 36 if ($this->User->save($this->data) && $this->Confirm->delete($data['Confirm']['id'])): 37 $this->flash(__('Your account has been activated', true), '/ users/login', 1);37 $this->flash(__('Your account has been activated', true), '/', 2); 38 38 endif; 39 39 else: 40 $this->flash('There is not such account', '/ users/login', 2);40 $this->flash('There is not such account', '/', 2); 41 41 endif; 42 42 } -
trunk/app/controllers/users_controller.php
r785 r788 268 268 $this->Sanitize = new Sanitize; 269 269 270 $this->Sanitize->html($this->data[ "User"]["name"]);271 272 $this->Sanitize->html($this->data[ "User"]["username"]);273 274 $this->Sanitize->html($this->data[ "User"]["description"]);275 276 $this->Sanitize->html($this->data[ "User"]["email"]);270 $this->Sanitize->html($this->data['User']['name']); 271 272 $this->Sanitize->html($this->data['User']['username']); 273 274 $this->Sanitize->html($this->data['User']['cv']); 275 276 $this->Sanitize->html($this->data['User']['email']); 277 277 278 278 // adds new classroom to database 279 279 if (!empty($this->data['User'])) 280 280 { 281 $message = array( "oops"=>"Oooppps!");281 $message = array('oops'=>'Oooppps!'); 282 282 283 283 /** Check Passwd **/ … … 292 292 /** username check **/ 293 293 if (strlen($this->data['User']['username']) < 5): 294 $message['pwd_username'] = "The username has less than 5 characters ";294 $message['pwd_username'] = 'The username has less than 5 characters '; 295 295 endif; 296 296 297 297 /** name check **/ 298 298 if (strlen($this->data['User']['name']) < 5): 299 $message['pwd_username'] = "The name is too short";299 $message['pwd_username'] = 'The name is too short'; 300 300 endif; 301 301 302 302 if (strpos($this->data['User']['pwd'], ' ')): // pwd no spaces 303 $message['username_spaces'] = "Your password should not contain spaces";303 $message['username_spaces'] = 'Your password should not contain spaces'; 304 304 endif; 305 305 306 306 /** description check **/ 307 if (strlen($this->data['User'][' description']) < 5):308 $message['description_too_short'] = "C'mon pal, talk us about you!";307 if (strlen($this->data['User']['cv']) < 5): 308 $message['description_too_short'] = 'C\'mon pal, talk us about you!'; 309 309 endif; 310 310 311 311 /** email check **/ 312 312 if ($this->Adds->validEmail($this->data['User']['email']) === false): 313 $message['pwd_username'] = "Typed email is invalid";313 $message['pwd_username'] = 'Email is invalid'; 314 314 endif; 315 315 … … 332 332 333 333 if ( $this->data['User']['code'] != $code ): 334 $message['wrong_code'] = "The code is incorrect, please put in contact with your school webmaster.";334 $message['wrong_code'] = 'The code is incorrect, please put in contact with your school webmaster.'; 335 335 endif; 336 336 … … 345 345 $this->data['Confirm']['user_id'] = $this->User->getLastInsertID(); // the user id 346 346 $this->data['Confirm']['secret'] = $this->Adds->genPassword(14); // secret confirm ID 347 348 $this->User->Confirm->create();349 347 350 348 // put the user in confirm model, this is, waiting for user confirmation trough email
