mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-30 22:41:47 -05:00
Fix insufficient access level bug on invite page
This commit is contained in:
parent
5845c6c427
commit
51b5d26f09
@ -48,10 +48,11 @@ function generate($level)
|
|||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
if (isset($_SESSION['id'])) {
|
if (isset($_SESSION['id'])) {
|
||||||
if ($_SESSION['level'] < '3' && $level > $_SESSION['level'] && $level < '4') {
|
if ($_SESSION['level'] < '3') {
|
||||||
if (empty($level)) {
|
if (empty($level)) {
|
||||||
include_once('./invite.php');
|
include_once('./invite.php');
|
||||||
} else {
|
} else {
|
||||||
|
if ($level > $_SESSION['level'] && $level < '4') {
|
||||||
$q = $db->prepare("INSERT INTO invites (code, level, issuer) VALUES (:code, :level, :issuer)");
|
$q = $db->prepare("INSERT INTO invites (code, level, issuer) VALUES (:code, :level, :issuer)");
|
||||||
$code = generateString(CODE_CHARSET, 16);
|
$code = generateString(CODE_CHARSET, 16);
|
||||||
$q->bindParam(':code', $code);
|
$q->bindParam(':code', $code);
|
||||||
@ -62,6 +63,7 @@ function generate($level)
|
|||||||
<p>Code: '.$code.'</p><br>
|
<p>Code: '.$code.'</p><br>
|
||||||
<p>Access Level: '.$level.'</p>';
|
<p>Access Level: '.$level.'</p>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
echo 'Insufficient Access Level.';
|
echo 'Insufficient Access Level.';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user