mirror of
https://github.com/e107inc/e107.git
synced 2025-08-19 21:02:09 +02:00
Fixes #881 - Signup permission check issue. Corrected signup-text styling and signature styling.
This commit is contained in:
28
signup.php
28
signup.php
@@ -265,7 +265,7 @@ if($signup_imagecode)
|
||||
}
|
||||
*/
|
||||
|
||||
if ((USER || ($pref['user_reg'] != 1) || (vartrue($pref['auth_method'],'e107') != 'e107')) && !getperms('0'))
|
||||
if ((USER || (intval($pref['user_reg']) !== 1) || (vartrue($pref['auth_method'],'e107') != 'e107')) && !getperms('0'))
|
||||
{
|
||||
header('location: '.e_HTTP.'index.php');
|
||||
|
||||
@@ -278,7 +278,7 @@ if(getperms('0')) // allow main admin to view signup page for design/testing.
|
||||
|
||||
$adminMsg = LAN_SIGNUP_112;
|
||||
|
||||
if($pref['user_reg'] !== 1)
|
||||
if(intval($pref['user_reg']) !== 1)
|
||||
{
|
||||
$adminMsg .= "<br />User registration is currently disabled";
|
||||
}
|
||||
@@ -380,9 +380,8 @@ if (e_QUERY)
|
||||
|
||||
//----------------------------------------
|
||||
// Initial signup (registration)
|
||||
//----------------------------------------
|
||||
|
||||
if (isset($_POST['register']) && $pref['user_reg'] === 1)
|
||||
if (isset($_POST['register']) && intval($pref['user_reg']) === 1)
|
||||
{
|
||||
e107::getCache()->clear("online_menu_totals");
|
||||
|
||||
@@ -513,12 +512,29 @@ if (isset($_POST['register']) && $pref['user_reg'] === 1)
|
||||
$temp[] = validatorClass::makeErrorList($eufVals,'USER_ERR_','%n - %t: %v', '<br />');
|
||||
}
|
||||
|
||||
message_handler('P_ALERT', implode('<br />', $temp));
|
||||
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
e107::getMessage()->addError(implode('<br />', $temp));
|
||||
}
|
||||
else
|
||||
{
|
||||
message_handler('P_ALERT', implode('<br />', $temp));
|
||||
}
|
||||
|
||||
}
|
||||
} // End of data validation
|
||||
else
|
||||
{
|
||||
message_handler('P_ALERT', implode('<br />', $extraErrors)); // Workaround for image-code errors.
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
e107::getMessage()->addError(implode('<br />', $temp));
|
||||
}
|
||||
else
|
||||
{
|
||||
message_handler('P_ALERT', implode('<br />', $extraErrors)); // Workaround for image-code errors.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user