ZMObject
|
+--ZMAccounts
public class ZMAccounts
extends ZMObject
| Constructor Summary | |
|---|---|
Create new instance. |
|
| Method Summary | |
|---|---|
| ZMAccount | createAccount(ZMAccount account) Create a new account. |
| boolean | emailExists(string email) Checks if a given email address exists. |
| ZMAccount | getAccountForEmailAddress(string emailAddress) Get account for the given email address. |
| ZMAccount | getAccountForId(int accountId) Get account for the given account id. |
| array | getSubscribedProductIds(int accountId) Get subscribed product ids. |
| static void | instance() Get instance. |
| boolean | isGlobalProductSubscriber(int accountId) Check for global product subscriber. |
| void | setGlobalProductSubscriber(int accountId, boolean globalProductSubscriber) Set the global product subscriber flag |
| ZMAccount | setSubscribedProductIds(ZMAccount account, array productIds) Set subscribed product ids. |
| ZMAccount | updateAccount(mixed account, ZMAccount The) Update an existing account. |
| void | updateAccountLoginStats(int accountId) Update account login stats. |
| Methods inherited from org.zenmagick.ZMObject | |
|---|---|
| backtrace, create, log, singleton | |
public ZMAccounts()
Create new instance. /
public ZMAccount createAccount(ZMAccount account)
Create a new account.
public boolean emailExists(string email)
Checks if a given email address exists.
true if the email address exists, false if not.public ZMAccount getAccountForEmailAddress(string emailAddress)
Get account for the given email address.
ZMAccount instance or null.public ZMAccount getAccountForId(int accountId)
Get account for the given account id.
ZMAccount instance or null.public array getSubscribedProductIds(int accountId)
Get subscribed product ids.
public static void instance()
Get instance. /
public boolean isGlobalProductSubscriber(int accountId)
Check for global product subscriber.
true if the account is a global product subscriber, false if not.public void setGlobalProductSubscriber(int accountId, boolean globalProductSubscriber)
Set the global product subscriber flag
true if global product is selected, false if not.public ZMAccount setSubscribedProductIds(ZMAccount account, array productIds)
Set subscribed product ids.
public ZMAccount updateAccount(mixed account, ZMAccount The)
Update an existing account.
NOTE: This will not update product notification changes!
Use setGlobalProductSubscriber(..) and
setSubscribedProductIds(..) * to update product
subscriptions.
public void updateAccountLoginStats(int accountId)
Update account login stats.
Accounts.