2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Fix issue with admin permissions not propogating to Limesurvey

This commit is contained in:
Adam Zammit
2017-01-13 10:35:46 +11:00
parent 2b6ce2ae1b
commit 9b48b3eb3f
2 changed files with 7 additions and 3 deletions

View File

@@ -72,7 +72,11 @@ if (isset($_POST['submit']))
SET users_name = " . $db->qstr($_POST['username']) . ",
email = " . $db->qstr($_POST['email']) . ",
full_name = " . $db->qstr($_POST['firstName']) . ",
superadmin = $superadmin";
superadmin = $superadmin,
create_survey = $superadmin,
configurator = $superadmin,
manage_template = $superadmin,
manage_label = $superadmin";
if (!empty($_POST['password']))
{

View File

@@ -118,8 +118,8 @@ if (isset($_POST['operator']) && isset($_POST['adduser']))
include_once("../include/limesurvey/admin/classes/core/sha256.php");
//Insert into lime_users
$sql = "INSERT INTO " . LIME_PREFIX . "users (`users_name`,`password`,`full_name`,`parent_id`,`superadmin`,`email`,`lang`)
VALUES ($operator, '" . SHA256::hashing($_POST['password']) . "',$firstname,1,$admin,$email,'auto')";
$sql = "INSERT INTO " . LIME_PREFIX . "users (`users_name`,`password`,`full_name`,`parent_id`,`superadmin`,`create_survey`,`configurator`,`manage_template`,`manage_label`,`email`,`lang`)
VALUES ($operator, '" . SHA256::hashing($_POST['password']) . "',$firstname,1,$admin,$admin,$admin,$admin,$admin,$email,'auto')";
$db->Execute($sql);