  |
12 | 12 | | |
| |
13 | 13 | | class osC_Account { |
| |
14 | 14 | | |
  |
| 15 | + | function &getEntry() { |
| |
| 16 | + | global $osC_Database, $osC_Customer; |
| |
| 17 | + | |
| |
| 18 | + | $Qaccount = $osC_Database->query('select customers_gender, customers_firstname, customers_lastname, unix_timestamp(customers_dob) as customers_dob, customers_email_address from :table_customers where customers_id = :customers_id'); |
| |
| 19 | + | $Qaccount->bindTable(':table_customers', TABLE_CUSTOMERS); |
| |
| 20 | + | $Qaccount->bindInt(':customers_id', $osC_Customer->id); |
| |
| 21 | + | $Qaccount->execute(); |
| |
| 22 | + | |
| |
| 23 | + | return $Qaccount; |
| |
| 24 | + | } |
| |
| 25 | + | |
| |
| 26 | + | function getID($email_address) { |
| |
| 27 | + | global $osC_Database; |
| |
| 28 | + | |
| |
| 29 | + | $Quser = $osC_Database->query('select customers_id from :table_customers where customers_email_address = :customers_email_address limit 1'); |
| |
| 30 | + | $Quser->bindTable(':table_customers', TABLE_CUSTOMERS); |
| |
| 31 | + | $Quser->bindValue(':customers_email_address', $email_address); |
| |
| 32 | + | $Quser->execute(); |
| |
| 33 | + | |
| |
| 34 | + | if ($Quser->numberOfRows() === 1) { |
| |
| 35 | + | return $Quser->valueInt('customers_id'); |
| |
| 36 | + | } |
| |
| 37 | + | |
| |
| 38 | + | return false; |
| |
| 39 | + | } |
| |
| 40 | + | |
|
15 | 41 | | function checkEntry($email_address) { |
| |
16 | 42 | | global $osC_Database; |
| |
17 | 43 | | |
| |
|
|
 |
… |
|
49 | 75 | | |
| |
50 | 76 | | return false; |
| |
51 | 77 | | } |
  |
52 | | - | |
| |
53 | | - | function getID($email_address) { |
| |
54 | | - | global $osC_Database; |
| |
55 | | - | |
| |
56 | | - | $Quser = $osC_Database->query('select customers_id from :table_customers where customers_email_address = :customers_email_address limit 1'); |
| |
57 | | - | $Quser->bindTable(':table_customers', TABLE_CUSTOMERS); |
| |
58 | | - | $Quser->bindValue(':customers_email_address', $email_address); |
| |
59 | | - | $Quser->execute(); |
| |
60 | | - | |
| |
61 | | - | if ($Quser->numberOfRows() === 1) { |
| |
62 | | - | return $Quser->valueInt('customers_id'); |
| |
63 | | - | } |
| |
64 | | - | |
| |
65 | | - | return false; |
| |
66 | | - | } |
  |
67 | 78 | | } |
| |
68 | 79 | | ?> |