コード例 #1
0
ファイル: UserHandler.php プロジェクト: nmallare/platform
 /**
  * {@inheritdoc}
  */
 public function process(User $user)
 {
     if ($this->securityFacade !== null && $user->getCurrentOrganization() === null) {
         $user->setCurrentOrganization($this->securityFacade->getOrganization());
     }
     $this->form->setData($user);
     if (in_array($this->request->getMethod(), ['POST', 'PUT'])) {
         $this->form->submit($this->request);
         if ($this->form->isValid()) {
             $this->onSuccess($user);
             return true;
         }
     }
     return false;
 }