Fix: access forbidden if rowid is empty

This commit is contained in:
Regis Houssin 2012-02-27 17:36:27 +01:00
parent 0bae0148c1
commit 4bec281dd8

View File

@ -56,7 +56,7 @@ $typeid=GETPOST('typeid','int');
$userid=GETPOST('userid','int');
$socid=GETPOST('socid','int');
if ($rowid)
if ($rowid > 0)
{
// Load member
$result = $object->fetch($rowid);
@ -73,6 +73,10 @@ if ($rowid)
|| (($user->id != $adh->user_id) && $user->rights->user->user->password) );
}
}
else
{
accessforbidden();
}
// Define variables to know what current user can do on members
$canaddmember=$user->rights->adherent->creer;