/**
  * Deletes a user from the database
  *
  * @return string
  * @permissions delete
  */
 protected function actionDeleteUser()
 {
     //The user itself
     $objUser = new class_module_user_user($this->getSystemid());
     $objUser->deleteObject();
     $this->adminReload(class_link::getLinkAdminHref($this->getArrModule("modul"), "list"));
 }
 /**
  * Updates all user-data stored in the system.
  * This may be a long-running task, so execute this only explicitly
  * and not during common requests!
  *
  * @return bool
  */
 public function updateUserData()
 {
     //sync may take time -> increase the time available
     if (@ini_get("max_execution_time") < 500 && @ini_get("max_execution_time") > 0) {
         @ini_set("max_execution_time", "500");
     }
     $objLdap = class_ldap::getInstance();
     //fill all groups - loads new members
     $arrGroups = $this->getAllGroupIds();
     foreach ($arrGroups as $strSingleGroupId) {
         $objGroup = new class_usersources_group_ldap($strSingleGroupId);
         $objGroup->getUserIdsForGroup();
     }
     //parse all users
     $arrUsers = $this->getAllUserIds();
     foreach ($arrUsers as $strOneUserId) {
         $objUser = new class_module_user_user($strOneUserId);
         /** @var $objSourceUser class_usersources_user_ldap */
         $objSourceUser = $objUser->getObjSourceUser();
         $arrUserDetails = false;
         try {
             $arrUserDetails = $objLdap->getUserDetailsByDN($objSourceUser->getStrDN());
         } catch (class_exception $objEx) {
         }
         if ($arrUserDetails !== false) {
             $objSourceUser->setStrDN($arrUserDetails["identifier"]);
             $objSourceUser->setStrFamilyname($arrUserDetails["familyname"]);
             $objSourceUser->setStrGivenname($arrUserDetails["givenname"]);
             $objSourceUser->setStrEmail($arrUserDetails["mail"]);
             $objSourceUser->updateObjectToDb();
             $this->objDB->flushQueryCache();
         } else {
             //user seems to be deleted, remove from system, too
             $objUser->deleteObject();
         }
     }
     return true;
 }