function saveMe($checkUserData = true, $output = false) { $allowedUsers = Environment::getS("allowedUsers", null); if ($allowedUsers !== null and $this->A("isAdmin") == "0") { $AC = anyC::get("User", "isAdmin", "0"); $AC->addAssocV3("UserID", "!=", $this->getID()); $AC->lCV3(); if ($AC->numLoaded() >= $allowedUsers) { Red::errorD("Sie können keine weiteren Benutzer ohne Admin-Rechte anlegen. Bitte wenden Sie sich an den Support."); } } $U = new User($this->ID); $U->loadMe(false); if (mUserdata::getGlobalSettingValue("encryptionKey") == null and Session::isUserAdminS()) { mUserdata::setUserdataS("encryptionKey", Util::getEncryptionKey(), "eK", -1); } if ($this->A->SHApassword != "") { $this->A->SHApassword = sha1($this->A->SHApassword); } else { $this->A->SHApassword = $U->A("SHApassword"); } if ($checkUserData) { mUserdata::checkRestrictionOrDie("cantEdit" . str_replace("GUI", "", get_class($this))); } $this->loadAdapter(); $this->Adapter->saveSingle2($this->getClearClass(get_class($this)), $this->A); if ($output) { Red::messageSaved(); } }
function saveMe($checkUserData = true, $output = false) { Aspect::joinPoint("before", $this, get_class($this) . "::saveMe", $this->A); if ($checkUserData) { mUserdata::checkRestrictionOrDie("cantEdit" . str_replace("GUI", "", get_class($this))); } $this->loadAdapter(); $this->Adapter->saveSingle2($this->getClearClass(get_class($this)), clone $this->A); if ($output) { Red::messageSaved(); } }
function newMe($checkUserData = true, $output = false) { $ps = mUserdata::getPluginSpecificData("Adressen"); if (isset($ps["pluginSpecificCanUse1xAdresse"]) and $this->A->AuftragID == -1) { die("<p>Erstellen nicht möglich!<br />Plugin-spezifische Einstellungen aktiv.<br /><br />Sie können das Erstellen von Einträgen im Adressen-Plugin auch verbieten, dann wird die Option \"Adresse neu anlegen\" nicht mehr angezeigt.<br />Neue 1x-Adressen können weiterhin verwendet werden.</p>"); } elseif (!isset($ps["pluginSpecificCanUse1xAdresse"])) { mUserdata::checkRestrictionOrDie("cantCreate" . str_replace("GUI", "", get_class($this))); } $this->changeA("lastChange", time()); $id = parent::newMe(false, $output); if ($this->A("AuftragID") != -1 and $this->A("type") == "auftragsAdresse") { $Auftrag = new Auftrag($this->A("AuftragID")); $Auftrag->updateAdressID($id); } if (Session::isPluginLoaded("mSync") and $this->A("AuftragID") == -1) { mSync::newGUID("Adresse", $id, null, false); } return $id; }