public function executesetcountry($eventData)
 {
     $userCfg = new UserSettings(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getUserId());
     $userCfg->setKey('desktop-country', $eventData['country']);
     $domainSettings = new DomainSettings(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess());
     if (User::isAdminUser(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getUserName(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDomainId())) {
         $domainSettings->EditKey('desktop-country', $eventData['country']);
     }
     $this->status = $this->localeCatalog->getStr('countryset_status');
     $this->setChanged();
     $this->notifyObservers('status');
     $this->notifyObservers('javascript');
 }
Beispiel #2
0
function pass_edit($eventData)
{
    global $wuiMainStatus, $innomaticLocale;
    if ($eventData['newpassworda'] == $eventData['newpasswordb']) {
        if (strlen($eventData['newpassworda'])) {
            $tempUser = new User(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->domaindata['id']);
            $tempUser->setUserIdByUsername(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getUserName());
            $userData = $tempUser->getUserData();
            if (md5($eventData['oldpassword']) == $userData['password']) {
                $tempUser->changePassword($eventData['newpassworda']);
                $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('passwordchanged_status');
            } else {
                $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('wrongoldpassword_status');
            }
        } else {
            $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('newpasswordisempty_status');
        }
    } else {
        $wuiMainStatus->mArgs['status'] = $innomaticLocale->getStr('newpasswordnomatch_status');
    }
}
 public function executeSetmotd($eventData)
 {
     if (User::isAdminUser(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getUserName(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDomainId()) or \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->hasPermission('edit_motd')) {
         $domain = new \Innomatic\Domain\Domain(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDomainId(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess());
         $domain->setMotd($eventData['motd']);
         $this->status = $this->localeCatalog->getStr('motd_set.status');
         $this->setChanged();
         $this->notifyObservers('status');
     }
 }