public function load()
 {
     $userPendingSubUsersManager = UserPendingSubUsersManager::getInstance($this->config, $this->args);
     $userId = $this->getUserId();
     $pending_users = $userPendingSubUsersManager->getByUserIdOrderByDate($userId);
     $this->addParam("pendingUsers", $pending_users);
 }
Пример #2
0
 public function deleteUserAndDependencies($id)
 {
     $userDto = $this->selectByPK($id);
     if ($userDto) {
         $email = $userDto->getEmail();
         $this->deleteByPK($id);
         $userSubUsersManager = UserSubUsersManager::getInstance($this->config, $this->args);
         $userSubUsersManager->deleteByField('user_id', $id);
         $userPendingSubUsersManager = UserPendingSubUsersManager::getInstance($this->config, $this->args);
         $userPendingSubUsersManager->deleteByField('user_id', $id);
         require_once CLASSES_PATH . "/managers/CustomerCartManager.class.php";
         $customerCartManager = CustomerCartManager::getInstance($this->config, $this->args);
         $customerCartManager->deleteByField('email', $email);
         require_once CLASSES_PATH . "/managers/CustomerLocalEmailsManager.class.php";
         $customerLocalEmailsManager = CustomerLocalEmailsManager::getInstance($this->config, $this->args);
         $customerLocalEmailsManager->deleteByField('customer_email', $email);
         require_once CLASSES_PATH . "/managers/CompanyDealersManager.class.php";
         $companyDealersManager = CompanyDealersManager::getInstance($this->config, $this->args);
         $companyDealersManager->deleteByField('user_id', $id);
     }
 }