SetPassword only if strlen() > 0 - Symfony 1.4

Jeabariagonge

New Member
I have simple clasS:\[code\]User: id | login | password | desc\[/code\]and form with this.How can i make - if input password is null(strlen == 0) then in model doesn`t matter.Now i have in User.class.php in function save:\[code\]$this->setPassword(sha512($this->getPassword));\[/code\]
 
Back
Top