From: Marcel Werk Date: Thu, 9 Jan 2014 21:46:17 +0000 (+0100) Subject: Fixed broken user website X-Git-Tag: 2.0.2~27 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=270805b2eac8956ac5c0cc8ccb348d6fd7611f32;p=GitHub%2FWoltLab%2FWCF.git Fixed broken user website --- diff --git a/wcfsetup/install/files/lib/form/RegisterForm.class.php b/wcfsetup/install/files/lib/form/RegisterForm.class.php index 4e5b287384..3538ffeff0 100644 --- a/wcfsetup/install/files/lib/form/RegisterForm.class.php +++ b/wcfsetup/install/files/lib/form/RegisterForm.class.php @@ -346,11 +346,14 @@ class RegisterForm extends UserAddForm { if (isset($facebookData['bio'])) $saveOptions[User::getUserOptionID('aboutMe')] = $facebookData['bio']; if (isset($facebookData['location'])) $saveOptions[User::getUserOptionID('location')] = $facebookData['location']['name']; if (isset($facebookData['website'])) { - if (!Regex::compile('^https?://')->match($facebookData['website'])) { - $facebookData['website'] = 'http://' . $facebookData['website']; + $urls = preg_split('/[\s,;]/', $facebookData['website'], -1, PREG_SPLIT_NO_EMPTY); + if (!empty($urls)) { + if (!Regex::compile('^https?://')->match($urls[0])) { + $urls[0] = 'http://' . $urls[0]; + } + + $saveOptions[User::getUserOptionID('homepage')] = $urls[0]; } - - $saveOptions[User::getUserOptionID('homepage')] = $facebookData['website']; } // avatar @@ -424,15 +427,6 @@ class RegisterForm extends UserAddForm { $user = $result['returnValues']; $userEditor = new UserEditor($user); - // update user rank - if (MODULE_USER_RANK && !REGISTER_ACTIVATION_METHOD) { - $action = new UserProfileAction(array($userEditor), 'updateUserRank'); - $action->executeAction(); - } - // update user online marking - $action = new UserProfileAction(array($userEditor), 'updateUserOnlineMarking'); - $action->executeAction(); - // set avatar if provided if (!empty($avatarURL)) { $userAvatarAction = new UserAvatarAction(array(), 'fetchRemoteAvatar', array(