Exemplo n.º 1
0
 /**
  * Delete profile action
  *
  * @return void
  */
 protected function doActionDelete()
 {
     $this->getModelForm()->performAction('delete');
     // Send notification to the user
     \XLite\Core\Mailer::sendProfileDeleted($this->getProfile()->getLogin());
     $this->setReturnURL($this->buildURL('profile_list'));
 }
Exemplo n.º 2
0
 /**
  * doActionDelete
  *
  * @return void
  */
 protected function doActionDelete()
 {
     if (\XLite\Core\Auth::getInstance()->isAdmin()) {
         \XLite\Core\TopMessage::addWarning(static::t('Administrator account cannot be deleted via customer interface.'));
         $result = false;
     } else {
         $userLogin = $this->getModelForm()->getModelObject()->getLogin();
         $result = $this->getModelForm()->performAction('delete');
         if ($result) {
             // Send notification to the users department
             \XLite\Core\Mailer::sendProfileDeleted($userLogin);
         }
         $this->setHardRedirect();
         $this->setReturnURL($this->buildURL());
     }
 }