public function create($array) { if (isset($array['password'])) { $array['password'] = md5($array['password']); } parent::create($array); }
/** * Check user * @param sring $username * @return bool */ public function checkUserExist($username) { return (bool) parent::findBy(array('username' => $username)); }