Exemple #1
0
 function lock($f3)
 {
     if ($f3->exists('GET.newLockStatus')) {
         try {
             $db = $f3->get('db');
             $newLockStatus = $f3->get('GET.newLockStatus');
             Logger::Info($f3, "AdminGet.lock", "Setting lock setting to {$newLockStatus}");
             DbWrapper::updateEinstellung($db, 'isLocked', $newLockStatus);
         } catch (Exception $e) {
             Logger::Error($f3, "AdminGet.lock", "Error: {$e->getMessage()}");
         }
     }
     $f3->reroute('/admin/index');
 }
Exemple #2
0
 function changePassword($f3, $params)
 {
     $this->ensureAdmin($f3);
     $newPassword = $f3->get('POST.password');
     Logger::Info($f3, "AdminPost.changePassword", "Changing the admin password");
     DbWrapper::updateEinstellung($f3->get('db'), 'adminPassword', $newPassword);
     $f3->reroute('/admin/index');
 }