Allow family members to shop for other family members
This commit is contained in:
parent
b5716bb14c
commit
eeae574cb2
1 changed files with 9 additions and 7 deletions
|
@ -142,6 +142,7 @@ if (!empty($_GET["action"])) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!$opt["auto_connect_family_members"]) {
|
||||
$stmt = $smarty->dbh()->prepare("SELECT * FROM {$opt["table_prefix"]}shoppers WHERE shopper = ? AND mayshopfor = ? AND pending = 0");
|
||||
$stmt->bindParam(1, $userid, PDO::PARAM_INT);
|
||||
$stmt->bindParam(2, $shopfor, PDO::PARAM_INT);
|
||||
|
@ -150,6 +151,7 @@ if (!($stmt->fetch())) {
|
|||
echo "Nice try! (You can't shop for someone who hasn't approved it.)";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($_GET["sortdir"])) {
|
||||
$sortdir = strtoupper(trim($_GET["sortdir"])) == "DESC" ? "DESC" : "ASC";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue