$user = common_current_user();
+ // ...because they're logged in
+
+ assert(!empty($user));
+
// It must be a "real" login, not saved cookie login
if (!common_is_real_login()) {
// User must have the right to change admin settings
- $user = common_current_user();
-
if (!$user->hasRight(Right::CONFIGURESITE)) {
$this->clientError(_('You cannot make changes to this site.'));
return;
try {
$this->saveSettings();
+ // Reload settings
+
+ Config::loadSettings();
+
$this->success = true;
$this->msg = _('Settings saved.');
} catch (Exception $e) {