} 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');
+ }
}
}
$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;