save
This commit is contained in:
parent
27df1a73b5
commit
a0cb5fb6b0
36 changed files with 1886 additions and 187 deletions
|
@ -14,6 +14,10 @@ class users
|
|||
shipping_address_id INTEGER,
|
||||
billing_address_id INTEGER,
|
||||
opt_in_promotional BOOLEAN NOT NULL,
|
||||
opt_in_subscription BOOLEAN DEFAULT TRUE,
|
||||
opt_in_orders BOOLEAN DEFAULT TRUE,
|
||||
lifetime_spend INTEGER DEFAULT 0,
|
||||
lifetime_orders INTEGER DEFAULT 0,
|
||||
verified BOOLEAN NOT NULL,
|
||||
dark_theme BOOLEAN NOT NULL,
|
||||
nsec TEXT,
|
||||
|
@ -129,6 +133,15 @@ class users
|
|||
return $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public static function getByNpub($npub)
|
||||
{
|
||||
$query = "SELECT * FROM users WHERE npub = :npub";
|
||||
$stmt = app::$db->prepare($query);
|
||||
$stmt->bindParam(':npub', $npub);
|
||||
$stmt->execute();
|
||||
return $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public static function getByEmail($email)
|
||||
{
|
||||
$query = "SELECT * FROM users WHERE email = :email";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue