Qual: Uniformise code. user class use id in first param of fetch
This commit is contained in:
parent
5cc40ab6f4
commit
ea691a9e31
@ -83,13 +83,15 @@ $quality = 80;
|
|||||||
*/
|
*/
|
||||||
if ($_GET["subaction"] == 'addrights' && $caneditperms)
|
if ($_GET["subaction"] == 'addrights' && $caneditperms)
|
||||||
{
|
{
|
||||||
$edituser = new User($db,$_GET["id"]);
|
$edituser = new User($db);
|
||||||
|
$edituser->fetch($_GET["id"]);
|
||||||
$edituser->addrights($_GET["rights"]);
|
$edituser->addrights($_GET["rights"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["subaction"] == 'delrights' && $caneditperms)
|
if ($_GET["subaction"] == 'delrights' && $caneditperms)
|
||||||
{
|
{
|
||||||
$edituser = new User($db,$_GET["id"]);
|
$edituser = new User($db);
|
||||||
|
$edituser->fetch($_GET["id"]);
|
||||||
$edituser->delrights($_GET["rights"]);
|
$edituser->delrights($_GET["rights"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,8 @@ if ($user->id <> $_REQUEST["id"] && ! $canreaduser) accessforbidden();
|
|||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'addrights' && $caneditperms)
|
if ($_GET["action"] == 'addrights' && $caneditperms)
|
||||||
{
|
{
|
||||||
$edituser = new User($db,$_GET["id"]);
|
$edituser = new User($db);
|
||||||
|
$edituser->fetch($_GET["id"]);
|
||||||
$edituser->addrights($_GET["rights"],$module);
|
$edituser->addrights($_GET["rights"],$module);
|
||||||
|
|
||||||
// Si on a touche a ses propres droits, on recharge
|
// Si on a touche a ses propres droits, on recharge
|
||||||
@ -73,7 +74,8 @@ if ($_GET["action"] == 'addrights' && $caneditperms)
|
|||||||
|
|
||||||
if ($_GET["action"] == 'delrights' && $caneditperms)
|
if ($_GET["action"] == 'delrights' && $caneditperms)
|
||||||
{
|
{
|
||||||
$edituser = new User($db,$_GET["id"]);
|
$edituser = new User($db);
|
||||||
|
$edituser->fetch($_GET["id"]);
|
||||||
$edituser->delrights($_GET["rights"],$module);
|
$edituser->delrights($_GET["rights"],$module);
|
||||||
|
|
||||||
// Si on a touche a ses propres droits, on recharge
|
// Si on a touche a ses propres droits, on recharge
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user