Example #1
0
 public function authenticate()
 {
     $args = func_get_args();
     $args[] =& $this->state['credentials'];
     $this->state['authenticated'] = $this->authenticationValidator->evaluate($args);
     $this->modified = TRUE;
     if ($this->state['authenticated'] === TRUE) {
         $this->log->notice(sprintf("%s: user `%s` authenticated", __CLASS__, $args[0]));
     }
     return $this->state['authenticated'];
 }
Example #2
0
 public function evaluate($value)
 {
     $this->failureInfo = array();
     $e1 = $this->v1->evaluate($value);
     if ($e1 === FALSE) {
         $e2 = $this->v2->evaluate($value);
         if ($e2 === FALSE) {
             $this->failureInfo = array_merge($this->failureInfo, $this->v1->getFailureInfo(), $this->v2->getFailureInfo());
             return FALSE;
         }
         return TRUE;
     }
     return TRUE;
 }