Changeset 335
- Timestamp:
- 03/24/08 13:21:51 (10 months ago)
- Location:
- trunk/app
- Files:
-
- 4 modified
-
. (modified) (1 prop)
-
app_controller.php (modified) (1 diff)
-
controllers/users_controller.php (modified) (4 diffs)
-
views/users/register.ctp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app
-
Property
svn:ignore set
to
webroot/img/imgusers/
-
Property
svn:ignore set
to
-
trunk/app/app_controller.php
r333 r335 20 20 $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 21 21 $this->Auth->authorize = 'controller'; 22 $this->Auth->allow( array('view', 'display', 'subscribe', 'recover', 'reply', 'register', 'insert', 'vote', 'entry', 'download', 'blog','portfolio', 'about', 23 'message', 'search', 'directory', 'bloggers', 'add', 'rss', 'discussion') ); 22 $this->Auth->allow( array('view', 'display', 'subscribe', 'recover', 'reply', 'register', 'insert', 'vote', 'entry', 'download', 'blog','portfolio', 'about', 'signup', 'message', 'search', 'directory', 'bloggers', 'add', 'rss', 'discussion') ); 24 23 $this->Auth->autoRedirect = true; 25 24 $this->set('cU', $this->Auth->user()); // $cU current user array to use in the views if user logged -
trunk/app/controllers/users_controller.php
r334 r335 342 342 343 343 /** Check Passwd **/ 344 if (strlen($this->data['User']['p asswd']) < 6)344 if (strlen($this->data['User']['pwd']) < 6) 345 345 { 346 346 $message['pwd_worng'] = "The password has less than 6 characters "; … … 364 364 } 365 365 366 if (strpos($this->data['User']['p asswd'], ' ')) // pwd too short366 if (strpos($this->data['User']['pwd'], ' ')) // pwd too short 367 367 { 368 368 $message['username_spaces'] = "Your password should not contain spaces"; … … 415 415 416 416 417 $this->data['User']['p asswd'] = md5($this->data['User']['passwd']); // MD5417 $this->data['User']['pwd'] = md5($this->data['User']['pwd']); // MD5 418 418 $this->data['User']['active'] = 0; 419 419 $this->data['User']['name_blog'] = $this->data['User']['username'].'\'s corner'; … … 468 468 { 469 469 //die( var_dump($this->data['User']) ); 470 if (strlen($this->data["User"]["p asswd"]) > 5) // only if passwd is big enough471 { 472 $this->data["User"]["p asswd"] = md5($this->data["User"]["passwd"]); // MD5470 if (strlen($this->data["User"]["pwd"]) > 5) // only if pwd is big enough 471 { 472 $this->data["User"]["pwd"] = md5($this->data["User"]["pwd"]); // MD5 473 473 } 474 474 else 475 475 { 476 unset($this->data["User"]["p asswd"]);476 unset($this->data["User"]["pwd"]); 477 477 } 478 478 -
trunk/app/views/users/register.ctp
r284 r335 37 37 </div> 38 38 39 <?php echo $form->label('User.passwd', 'Password: ') . $form->password('User.passwd', array("size" => 9, "maxlength" => 9)) ?><span class="small">At least 6 characters</span> 39 <?php echo $form->label('User.pwd', 'Password: ') . $form->password('User.pwd', array("size" => 9, "maxlength" => 9)) ?> 40 <span class="small">At least 6 characters</span> 40 41 <br /><br /> 41 42 <?php echo $form->label('User.description', 'About you and your interests:' );?><br />
