Example #1
0
 public function isValid($value)
 {
     $isValid = true;
     $valueString = (string) $value;
     $this->_setValue($valueString);
     $tbl = new DbTable_Account();
     $Account = Service_Auth::getAccount();
     $select = $tbl->select()->where('username = ?', $Account->username);
     $select->where('password = ?', md5($value));
     $row = $tbl->fetchRow($select);
     if ($row === null) {
         $isValid = false;
         $this->_error(self::UNKNOWN);
     }
     return $isValid;
 }