ZenMagick 0.9.8


org.zenmagick.store.services.account.ZMAccounts
\store\services\account\ZMAccounts.php at line 34

Class ZMAccounts

ZMObject
└─ZMAccounts

public class ZMAccounts
extends ZMObject

Accounts.

Author:
DerManoMann
Version:
$Id: ZMAccounts.php 2694 2009-12-03 22:32:18Z dermanomann $

Field Summary
final int

AUTHORIZATION_BLOCKED

final int

$AUTHORIZATION_ENABLED

final int

AUTHORIZATION_PENDING

Fields inherited from org.zenmagick.core.ZMObject
properties_
Constructor Summary

ZMAccounts()

Create new instance.

Method Summary
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

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
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Field Detail

\store\services\account\ZMAccounts.php at line 38

AUTHORIZATION_BLOCKED

public final int AUTHORIZATION_BLOCKED = 4

\store\services\account\ZMAccounts.php at line 36

AUTHORIZATION_ENABLED

public final int $AUTHORIZATION_ENABLED

\store\services\account\ZMAccounts.php at line 37

AUTHORIZATION_PENDING

public final int AUTHORIZATION_PENDING = 1

Constructor Detail

\store\services\account\ZMAccounts.php at line 44

ZMAccounts

public ZMAccounts()

Create new instance.


Method Detail

\store\services\account\ZMAccounts.php at line 161

createAccount

public ZMAccount createAccount(ZMAccount account)

Create a new account.

Parameters:
account - The new account.
Returns:
The created account incl. the new account id.

\store\services\account\ZMAccounts.php at line 145

emailExists

public boolean emailExists(string emailAddress)

Checks if a given email address exists.

Parameters:
emailAddress - The email address.
Returns:
true if the email address exists, false if not.

\store\services\account\ZMAccounts.php at line 89

getAccountForEmailAddress

public ZMAccount getAccountForEmailAddress(string emailAddress)

Get account for the given email address.

Parameters:
emailAddress - The email address.
Returns:
A ZMAccount instance or null.

\store\services\account\ZMAccounts.php at line 69

getAccountForId

public ZMAccount getAccountForId(int accountId)

Get account for the given account id.

Parameters:
accountId - The account id.
Returns:
A ZMAccount instance or null.

\store\services\account\ZMAccounts.php at line 110

getAccountsForEmailAddress

public array getAccountsForEmailAddress(string emailAddress)

Get all accounts (guest and registered) for the given email address.

Parameters:
emailAddress - The email address.
Returns:
A ZMAccount instances.

\store\services\account\ZMAccounts.php at line 253

getSubscribedProductIds

public array getSubscribedProductIds(int accountId)

Get subscribed product ids.

Parameters:
accountId - The account id.
Returns:
A list of subscribed product ids.

\store\services\account\ZMAccounts.php at line 58

instance

public static void instance()

Get instance.


\store\services\account\ZMAccounts.php at line 224

isGlobalProductSubscriber

public boolean isGlobalProductSubscriber(int accountId)

Check for global product subscriber.

Parameters:
accountId - The account id.
Returns:
true if the account is a global product subscriber, false if not.

\store\services\account\ZMAccounts.php at line 210

setAccountPassword

public void setAccountPassword(mixed accountId, mixed password)

Set password for account


\store\services\account\ZMAccounts.php at line 239

setGlobalProductSubscriber

public void setGlobalProductSubscriber(int accountId, boolean globalProductSubscriber)

Set the global product subscriber flag

Parameters:
accountId - The account id.
globalProductSubscriber - true if global product is selected, false if not.

\store\services\account\ZMAccounts.php at line 271

setSubscribedProductIds

public ZMAccount setSubscribedProductIds(ZMAccount account, array productIds)

Set subscribed product ids.

Parameters:
account - The account.
productIds - The new list of subscribed product ids.
Returns:
The aupdated account.

\store\services\account\ZMAccounts.php at line 185

updateAccount

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.

Parameters:
The - account.
Returns:
The updated account.

\store\services\account\ZMAccounts.php at line 130

updateAccountLoginStats

public void updateAccountLoginStats(int accountId)

Update account login stats.

Parameters:
accountId - The account id.

ZenMagick 0.9.8