From 19f1a99afd1a4e8f666fbd19dee5e4f5624c1d5f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 6 Jul 2015 15:28:04 +0200 Subject: [PATCH] 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. --- wcfsetup/install/files/lib/form/RegisterForm.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'; -- 2.20.1