Class Mage_Customer_Model_Customer

Description

Customer model

Located in /Customer/Model/Customer.php (line 32)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_Customer_Model_Customer
Class Constant Summary
 SUBSCRIBED_NO = 'no'
 SUBSCRIBED_YES = 'yes'
 XML_PATH_CONFIRMED_EMAIL_TEMPLATE = 'customer/create_account/email_confirmed_template'
 XML_PATH_CONFIRM_EMAIL_TEMPLATE = 'customer/create_account/email_confirmation_template'
 XML_PATH_DEFAULT_EMAIL_DOMAIN = 'customer/create_account/email_domain'
 XML_PATH_FORGOT_EMAIL_IDENTITY = 'customer/password/forgot_email_identity'
 XML_PATH_FORGOT_EMAIL_TEMPLATE = 'customer/password/forgot_email_template'
 XML_PATH_IS_CONFIRM = 'customer/create_account/confirm'
 XML_PATH_REGISTER_EMAIL_IDENTITY = 'customer/create_account/email_identity'
 XML_PATH_REGISTER_EMAIL_TEMPLATE = 'customer/create_account/email_template'
Variable Summary
Method Summary
void addError ( $error)
true authenticate (string $login, string $password)
this changePassword ( $newPassword, [bool $checkCurrent = true], array $data)
string decryptPassword (string $password)
string encryptPassword (string $password)
string generatePassword ([int $length = 6])
Mage_Customer_Model_Address_Collection getAddressCollection ()
array getAddresses ()
void getAttribute ( $attributeCode)
array getAttributes ()
void getErrors ()
int getGroupId ()
string getName ()
Mage_Customer_Mode_Address getPrimaryAddress (string $attributeCode)
Mage_Customer_Mode_Address getPrimaryBillingAddress ()
Mage_Customer_Mode_Address getPrimaryShippingAddress ()
unknown getSharingConfig ()
int getTaxClassId ()
string hashPassword (string $password, [ $salt = null])
uMage_Customer_Model_Customer importFromTextArray ( $row)
bool isInStore (mixed $store)
Mage_Customer_Model_Customer loadByEmail (string $customerEmail)
void printError ( $error, [ $line = null])
void resetErrors ()
Mage_Customer_Model_Customer sendNewAccountEmail ([ $type = 'registered'], [ $backUrl = ''])
bool validate ()
void validateAddress ( $data, [ $type = 'billing'])
boolean validatePassword (string $password)
void _beforeDelete ()
void _construct ()
Variables
mixed $_addresses = null (line 51)
  • access: protected
mixed $_attributes (line 53)
  • access: protected
mixed $_errors = array() (line 52)
  • access: protected
mixed $_eventObject = 'customer' (line 50)
  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::$_eventObject
Parameter name in event
mixed $_eventPrefix = 'customer' (line 49)
  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::$_eventPrefix
Prefix of model events names

Inherited Variables

Inherited from Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::$_cacheTag
Mage_Core_Model_Abstract::$_dataSaveAllowed
Mage_Core_Model_Abstract::$_resource
Mage_Core_Model_Abstract::$_resourceCollectionName
Mage_Core_Model_Abstract::$_resourceName
Methods
addAddress (line 170)

Add address to address collection

  • access: public
addError (line 878)
void addError ( $error)
  • $error
authenticate (line 81)

Authenticate customer

  • throws: Exception
  • access: public
true authenticate (string $login, string $password)
  • string $login
  • string $password
changePassword (line 136)

Change customer password

$data = array( ['password'] ['confirmation'] ['current_password'] )

  • access: public
this changePassword ( $newPassword, [bool $checkCurrent = true], array $data)
  • array $data
  • bool $checkCurrent
  • $newPassword
cleanAllAddresses (line 874)
void cleanAllAddresses ()
decryptPassword (line 311)

Decrypt password

  • access: public
string decryptPassword (string $password)
  • string $password
encryptPassword (line 300)

Encrypt password

  • access: public
string encryptPassword (string $password)
  • string $password
generatePassword (line 274)

Retrieve random password

  • access: public
string generatePassword ([int $length = 6])
  • int $length
getAdditionalAddresses (line 415)

Retrieve not primary addresses

  • access: public
array getAdditionalAddresses ()
getAddressById (line 183)

Retrieve customer address by address id

  • access: public
Mage_Customer_Model_Address getAddressById (int $addressId)
  • int $addressId
getAddressCollection (line 194)

Retrieve not loaded address collection

  • access: public
Mage_Customer_Model_Address_Collection getAddressCollection ()
getAddresses (line 204)

Retrieve customer address array

  • access: public
array getAddresses ()
getAttribute (line 235)
  • access: public
void getAttribute ( $attributeCode)
  • $attributeCode
getAttributes (line 225)

Retrieve all customer attributes

  • access: public
array getAttributes ()
getDefaultBillingAddress (line 346)
  • access: public
void getDefaultBillingAddress ()
getDefaultShippingAddress (line 361)
  • access: public
void getDefaultShippingAddress ()
getErrors (line 883)
void getErrors ()
getGroupId (line 532)

Retrieve customer group identifier

  • access: public
int getGroupId ()
getName (line 147)

Get full customer name

  • access: public
string getName ()
getPrimaryAddress (line 322)

Retrieve primary address by type(attribute)

  • access: public
Mage_Customer_Mode_Address getPrimaryAddress (string $attributeCode)
  • string $attributeCode
getPrimaryAddresses (line 388)

Retrieve all customer primary addresses

  • access: public
array getPrimaryAddresses ()
getPrimaryAddressIds (line 371)

Retrieve ids of primary addresses

  • access: public
unknown getPrimaryAddressIds ()
getPrimaryBillingAddress (line 341)

Retrieve customer primary billing address

  • access: public
Mage_Customer_Mode_Address getPrimaryBillingAddress ()
getPrimaryShippingAddress (line 356)

Retrieve primary customer shipping address

  • access: public
Mage_Customer_Mode_Address getPrimaryShippingAddress ()
getRandomConfirmationKey (line 489)
  • access: public
void getRandomConfirmationKey ()
getSharedStoreIds (line 587)

Retrieve shared store ids

  • access: public
array getSharedStoreIds ()
getSharedWebsiteIds (line 610)

Retrive shared website ids

  • access: public
array getSharedWebsiteIds ()
getSharingConfig (line 67)

Retrieve customer sharing configuration model

  • access: public
unknown getSharingConfig ()
getStore (line 577)

Retrieve store where customer was created

  • access: public
Mage_Core_Model_Store getStore ()
getTaxClassId (line 546)

Retrieve customer tax class identifier

  • access: public
int getTaxClassId ()
hashPassword (line 263)

Hach customer password

  • access: public
string hashPassword (string $password, [ $salt = null])
  • string $password
  • $salt
importFromTextArray (line 694)

Importing customer data from text array

  • access: public
uMage_Customer_Model_Customer importFromTextArray ( $row)
  • array $row
isAddressPrimary (line 427)
  • access: public
void isAddressPrimary (Mage_Customer_Model_Address $address)
isConfirmationRequired (line 481)

Check if accounts confirmation is required in config

  • access: public
bool isConfirmationRequired ()
isInStore (line 560)

Check store availability for customer

  • access: public
bool isInStore (mixed $store)
  • mixed $store
loadByEmail (line 99)

Load customer by email

  • access: public
Mage_Customer_Model_Customer loadByEmail (string $customerEmail)
  • string $customerEmail
printError (line 893)
void printError ( $error, [ $line = null])
  • $error
  • $line
resetErrors (line 888)
void resetErrors ()
sendNewAccountEmail (line 440)

Send email with new account specific information

  • access: public
Mage_Customer_Model_Customer sendNewAccountEmail ([ $type = 'registered'], [ $backUrl = ''])
  • $type
  • $backUrl
sendPasswordReminderEmail (line 499)

Send email with new customer password

  • access: public
Mage_Customer_Model_Customer sendPasswordReminderEmail ()
setPassword (line 250)

Set plain and hashed password

  • access: public
Mage_Customer_Model_Customer setPassword (string $password)
  • string $password
setStore (line 634)

Enter description here...

  • access: public
Mage_Customer_Model_Customer setStore ( $store)
unsetSubscription (line 867)
void unsetSubscription ()
validate (line 645)

Validate customer attribute values

  • access: public
bool validate ()
validateAddress (line 907)
void validateAddress ( $data, [ $type = 'billing'])
  • array $data
  • $type
validatePassword (line 285)

Validate password with salted hash

  • access: public
boolean validatePassword (string $password)
  • string $password
_beforeDelete (line 941)
  • access: protected
void _beforeDelete ()

Redefinition of:
Mage_Core_Model_Abstract::_beforeDelete()
Processing object before delete data
_beforeSave (line 111)

Processing object before save data

  • access: protected
Mage_Core_Model_Abstract _beforeSave ()

Redefinition of:
Mage_Core_Model_Abstract::_beforeSave()
Processing object before save data
_construct (line 57)
void _construct ()

Inherited Methods

Inherited From Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::afterLoad()
Mage_Core_Model_Abstract::delete()
Mage_Core_Model_Abstract::getCollection()
Mage_Core_Model_Abstract::getEntityId()
Mage_Core_Model_Abstract::getId()
Mage_Core_Model_Abstract::getIdFieldName()
Mage_Core_Model_Abstract::getResource()
Mage_Core_Model_Abstract::getResourceCollection()
Mage_Core_Model_Abstract::getResourceName()
Mage_Core_Model_Abstract::load()
Mage_Core_Model_Abstract::save()
Mage_Core_Model_Abstract::setId()
Mage_Core_Model_Abstract::_afterDelete()
Mage_Core_Model_Abstract::_afterLoad()
Mage_Core_Model_Abstract::_afterSave()
Mage_Core_Model_Abstract::_beforeDelete()
Mage_Core_Model_Abstract::_beforeSave()
Mage_Core_Model_Abstract::_getResource()
Mage_Core_Model_Abstract::_init()
Mage_Core_Model_Abstract::_protectFromNonAdmin()
Mage_Core_Model_Abstract::_setResourceModel()
Class Constants
EXCEPTION_EMAIL_NOT_CONFIRMED = 1 (line 43)
EXCEPTION_INVALID_EMAIL_OR_PASSWORD = 2 (line 44)
SUBSCRIBED_NO = 'no' (line 47)
SUBSCRIBED_YES = 'yes' (line 46)
XML_PATH_CONFIRMED_EMAIL_TEMPLATE = 'customer/create_account/email_confirmed_template' (line 41)
XML_PATH_CONFIRM_EMAIL_TEMPLATE = 'customer/create_account/email_confirmation_template' (line 40)
XML_PATH_DEFAULT_EMAIL_DOMAIN = 'customer/create_account/email_domain' (line 38)
XML_PATH_FORGOT_EMAIL_IDENTITY = 'customer/password/forgot_email_identity' (line 37)
XML_PATH_FORGOT_EMAIL_TEMPLATE = 'customer/password/forgot_email_template' (line 36)
XML_PATH_IS_CONFIRM = 'customer/create_account/confirm' (line 39)
XML_PATH_REGISTER_EMAIL_IDENTITY = 'customer/create_account/email_identity' (line 35)
XML_PATH_REGISTER_EMAIL_TEMPLATE = 'customer/create_account/email_template' (line 34)

Documentation generated on Wed, 04 Feb 2009 03:15:59 +0200 by phpDocumentor 1.4.2