ZMObject
└─ZMAccounts
public class ZMAccounts
extends ZMObject
| Constant Summary | |
|---|---|
| final static int | |
| final static int | |
| final static int | |
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | Create new instance. |
| ZMAccount | createAccount(ZMAccount account) Create a new account. |
| boolean | emailExists(string emailAddress) 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 | getAccountsForEmailAddress(string emailAddress) Get all accounts (guest and registered) for the given email address. |
| array | getAllAccounts(string type, int limit) Get all accounts. |
| array | getSubscribedProductIds(int accountId) Get subscribed product ids. |
| static void | instance() Get instance. |
| boolean | isGlobalProductSubscriber(int accountId) Check for global product subscriber. |
| void | setAccountPassword(mixed accountId, mixed password) Set password for account |
| 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.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
public final static int AUTHORIZATION_BLOCKED = 4
public final static int $AUTHORIZATION_ENABLED
public final static int AUTHORIZATION_PENDING = 1
public void __construct()
Create new instance.
public ZMAccount createAccount(ZMAccount account)
Create a new account.
public boolean emailExists(string emailAddress)
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 getAccountsForEmailAddress(string emailAddress)
Get all accounts (guest and registered) for the given email address.
public array getAllAccounts(string type, int limit)
Get all accounts.
ZMAccount::REGISTERED, ZMAccount::GUEST); default is null for all.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 setAccountPassword(mixed accountId, mixed password)
Set password for account
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.