// Update the public contact as well
$fields['prvkey'] = null;
$fields['self'] = false;
- DBA::update('contact', $fields, ['uid' => 0, 'nurl' => $self['nurl']]);
+ self::update($fields, ['uid' => 0, 'nurl' => $self['nurl']]);
// Update the profile
- $fields = ['photo' => DI::baseUrl() . '/photo/profile/' .$uid . '.' . $file_suffix,
- 'thumb' => DI::baseUrl() . '/photo/avatar/' . $uid .'.' . $file_suffix];
+ $fields = [
+ 'photo' => User::getAvatarUrlForId($uid),
+ 'thumb' => User::getAvatarUrlForId($uid, Proxy::SIZE_THUMB)
+ ];
+
DBA::update('profile', $fields, ['uid' => $uid]);
}