From: Tim Düsterhus Date: Mon, 6 Jul 2015 13:28:04 +0000 (+0200) Subject: Fix fetching of 3rd party avatar in RegisterForm X-Git-Tag: 2.1.6~16^2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=19f1a99afd1a4e8f666fbd19dee5e4f5624c1d5f;p=GitHub%2FWoltLab%2FWCF.git Fix fetching of 3rd party avatar in RegisterForm It was broken due to the usersOnly permissions as the maximum avatar size in bytes is zero for guests. --- diff --git a/wcfsetup/install/files/lib/form/RegisterForm.class.php b/wcfsetup/install/files/lib/form/RegisterForm.class.php index fe7bbac992..9686e8dd15 100644 --- a/wcfsetup/install/files/lib/form/RegisterForm.class.php +++ b/wcfsetup/install/files/lib/form/RegisterForm.class.php @@ -445,6 +445,9 @@ class RegisterForm extends UserAddForm { $user = $result['returnValues']; $userEditor = new UserEditor($user); + // update session + WCF::getSession()->changeUser($user); + // set avatar if provided if (!empty($avatarURL)) { $userAvatarAction = new UserAvatarAction(array(), 'fetchRemoteAvatar', array( @@ -454,9 +457,6 @@ class RegisterForm extends UserAddForm { $userAvatarAction->executeAction(); } - // update session - WCF::getSession()->changeUser($user); - // activation management if (REGISTER_ACTIVATION_METHOD == 0) { $this->message = 'wcf.user.register.success';