- if (isNicknameUsed(getRequestParameter('userid'))) {
- // Is the nickname extension there?
- if (isExtensionActive('nickname')) {
- // Maybe we have found a nickname?
- fetchUserData(getRequestParameter('userid'), 'nickname');
- } else {
- // Nickname entered but nickname is not active
- $errorCode = getCode('EXTENSION_PROBLEM');
- }
+ if ((isExtensionActive('nickname')) && (isNicknameUsed(getRequestElement('userid')))) {
+ // Maybe we have found a nickname?
+ fetchUserData(getRequestElement('userid'), 'nickname');
+ } elseif (isNicknameUsed(getRequestElement('userid'))) {
+ // Nickname entered but nickname is not active
+ $errorCode = getCode('EXTENSION_PROBLEM');