$userid = getMemberId();
} elseif ((isPostRequestParameterSet('id')) && (isPostRequestParameterSet('password')) && (isFormSent())) {
// Set userid and crypt password when login data was submitted
- if ((isExtensionActive('nickname')) && (isNicknameUsed(postRequestParameter('id')))) {
+ if (isExtensionActive('nickname')) {
// Nickname entered
$userid = SQL_ESCAPE(postRequestParameter('id'));
} else {
} elseif (isPostRequestParameterSet('new_pass')) {
// New password requested
$userid = '0';
- if ((isPostRequestParameterSet('id')) && (postRequestParameter('id') > 0)) $userid = bigintval(postRequestParameter('id'));
+ if (isPostRequestParameterSet('id')) {
+ // Do we have nickname or userid?
+ if ((isExtensionActive('nickname')) && (isNicknameUsed(postRequestParameter('id')))) {
+ // Nickname entered
+ $userid = SQL_ESCAPE(postRequestParameter('id'));
+ } else {
+ // Direct userid entered
+ $userid = bigintval(postRequestParameter('id'));
+ }
+ } // END - if
} else {
// Not logged in
$userid = '0'; $hash = '';
// @TODO Move this HTML code into a template
$content['message'] = '<tr>
<td colspan="4" align="center">
- <span class="guest_failed">' . getMessageFromErrorCode($errorCode) . '</span>
+ <span class="notice">' . getMessageFromErrorCode($errorCode) . '</span>
</td>
</tr>';
} // END - if