コード例 #1
0
 public function validate(\Nethgui\Controller\ValidationReportInterface $report)
 {
     parent::validate($report);
     if ($this->getRequest()->isMutation()) {
         $v = new \NethServer\Tool\PamValidator();
         $v->setLog($this->getLog());
         $v->setPhpWrapper($this->getPhpWrapper());
         if (!$v->evaluate(array($this->getRequest()->getUser()->getCredential('username'), $this->parameters['oldPassword']))) {
             $report->addValidationError($this, 'oldPassword', $v);
         }
     }
 }