X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fprofilesettings.php;h=161e35b111f450ed7ce14ef5d3e94f79bac9e0f3;hb=41dfea163460bb216483e8e12fff7a8afefbb4fb;hp=ee236fe62503ec3b3cd7adf5af58e813a3605713;hpb=a9d835920824c48caef2a66686d6605ff54586b3;p=quix0rs-gnu-social.git diff --git a/actions/profilesettings.php b/actions/profilesettings.php index ee236fe625..161e35b111 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -285,6 +285,10 @@ class ProfilesettingsAction extends AccountSettingsAction } else { // Re-initialize language environment if it changed common_init_language(); + // Clear the site owner, in case nickname changed + if ($user->hasRole(Profile_role::OWNER)) { + User::blow('user:site_owner'); + } } } @@ -316,7 +320,12 @@ class ProfilesettingsAction extends AccountSettingsAction $loc = Location::fromName($location); - if (!empty($loc)) { + if (empty($loc)) { + $profile->lat = null; + $profile->lon = null; + $profile->location_id = null; + $profile->location_ns = null; + } else { $profile->lat = $loc->lat; $profile->lon = $loc->lon; $profile->location_id = $loc->location_id;