src/Towel/Model/User.php
public function validateLogin($email, $password)
    {
        $password = md5($password);

        $result = $this->fetchOne(
            "SELECT * FROM {$this->table} WHERE email = ? AND password = ?",
            array($email, $password)
        );

        if (!empty($result)) {
            return true;
        }

        return false;
    }
public function validateLogin($email, $password)
    {
        $password = md5($password);

        $result = $this->fetchOne(
            "SELECT * FROM {$this->table} WHERE email = ? AND password = ?",
            array($email, $password)
        );

        if (!empty($result)) {
            return true;
        }

        return false;
    }
public function validateLogin ( $ email , $ password ) { $ password = md5 ( $ password ) ; $ result = $ this -> fetchOne ( "SELECT * FROM {$this->table} WHERE email = ? AND password = ?" , array ( $ email , $ password ) ) ; if ( ! empty ( $ result ) ) { return true ; } return false ; }
Validates username and password against the DB.
If success sets the user info in the object and return true.
If fails returns false.

@param String $email
@param String $password

@return Boolean
Validates username and password against the DB . If success sets the user info in the object and return true . If fails returns false .