Changeset 335

Show
Ignore:
Timestamp:
03/24/08 13:21:51 (10 months ago)
Author:
aarkerio
Message:

Controllers update

Location:
trunk/app
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/app

    • Property svn:ignore set to
      webroot/img/imgusers/
  • trunk/app/app_controller.php

    r333 r335  
    2020     $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 
    2121     $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') ); 
    2423     $this->Auth->autoRedirect = true; 
    2524     $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  
    342342     
    343343   /** Check Passwd **/ 
    344    if (strlen($this->data['User']['passwd']) < 6) 
     344   if (strlen($this->data['User']['pwd']) < 6) 
    345345   { 
    346346       $message['pwd_worng'] = "The password has less than 6 characters "; 
     
    364364    } 
    365365     
    366     if (strpos($this->data['User']['passwd'], ' '))  // pwd too short 
     366    if (strpos($this->data['User']['pwd'], ' '))  // pwd too short 
    367367    { 
    368368       $message['username_spaces'] = "Your password should not contain spaces"; 
     
    415415     
    416416     
    417     $this->data['User']['passwd']    = md5($this->data['User']['passwd']); // MD5 
     417    $this->data['User']['pwd']    = md5($this->data['User']['pwd']); // MD5 
    418418    $this->data['User']['active']    = 0; 
    419419    $this->data['User']['name_blog'] = $this->data['User']['username'].'\'s corner';  
     
    468468    { 
    469469        //die( var_dump($this->data['User']) ); 
    470         if (strlen($this->data["User"]["passwd"]) > 5)   // only if passwd is big enough 
    471         { 
    472              $this->data["User"]["passwd"] = md5($this->data["User"]["passwd"]); // MD5  
     470        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  
    473473        }  
    474474        else  
    475475        { 
    476              unset($this->data["User"]["passwd"]);       
     476             unset($this->data["User"]["pwd"]);       
    477477        } 
    478478         
  • trunk/app/views/users/register.ctp

    r284 r335  
    3737     </div> 
    3838      
    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> 
    4041     <br /><br /> 
    4142     <?php echo $form->label('User.description', 'About you and your interests:' );?><br />