$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
} elseif ((!EXT_IS_ACTIVE('user')) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'user'));
+ addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('user'));
return;
}
// Initialize variables
$errorCode = 0;
-$probe_nickname = false;
$uid = false;
$hash = '';
$URL = '';
if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) {
// Maybe, then continue with it
$uid = getUserId();
-} elseif ((REQUEST_ISSET_POST('id')) && (REQUEST_ISSET_POST(('password'))) && (IS_FORM_SENT())) {
+} elseif ((REQUEST_ISSET_POST('id')) && (REQUEST_ISSET_POST('password')) && (isFormSent())) {
// Set userid and crypt password when login data was submitted
- if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID(REQUEST_POST('id')))) {
+ if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_IS_ACTIVE(REQUEST_POST('id')))) {
// Nickname entered
$uid = SQL_ESCAPE(REQUEST_POST('id'));
} else {
// Direct userid entered
$uid = bigintval(REQUEST_POST('id'));
}
-} elseif (REQUEST_ISSET_POST(('new_pass'))) {
+} elseif (REQUEST_ISSET_POST('new_pass')) {
// New password requested
$uid = 0;
if (REQUEST_ISSET_POST('id')) $uid = REQUEST_POST('id');
}
// Set unset variables
-if (!REQUEST_ISSET_POST(('new_pass'))) REQUEST_SET_POST('new_pass', '');
-if (!REQUEST_ISSET_GET(('login'))) REQUEST_SET_GET('login' , '');
+if (!REQUEST_ISSET_POST('new_pass')) REQUEST_SET_POST('new_pass', '');
+if (!REQUEST_ISSET_GET('login')) REQUEST_SET_GET('login' , '');
if (IS_MEMBER()) {
// Login immidiately...
$URL = 'modules.php?module=login';
-} elseif ((IS_FORM_SENT()) && (''.$uid.'' != ''.REQUEST_POST('id') . '')) {
+} elseif ((isFormSent()) && (''.$uid.'' != ''.REQUEST_POST('id') . '')) {
// Invalid input (no nickname extension installed but nickname entered)
$errorCode = getCode('EXTENSION_PROBLEM');
-} elseif (IS_FORM_SENT()) {
+} elseif (isFormSent()) {
// Try the login (see inc/libs/user_functions.php)
$URL = USER_DO_LOGIN(REQUEST_POST('id'), REQUEST_POST('password'));
-} elseif ((REQUEST_ISSET_POST(('new_pass'))) && (isset($uid))) {
+} elseif ((REQUEST_ISSET_POST('new_pass')) && (isset($uid))) {
// Try the userid/email lookup (see inc/libs/user_functions.php)
$errorCode = USER_DO_NEW_PASSWORD(REQUEST_POST('email'), $uid);
}
// Login problems?
-if (REQUEST_ISSET_GET(('login'))) {
+if (REQUEST_ISSET_GET('login')) {
// Use code from URL
- $errorCode = REQUEST_GET(('login'));
+ $errorCode = REQUEST_GET('login');
} // END - if
// Login problems?