Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Customer_AccountController
  • Mage_Customer_AddressController
  • Mage_Customer_Block_Account
  • Mage_Customer_Block_Account_Dashboard
  • Mage_Customer_Block_Account_Dashboard_Address
  • Mage_Customer_Block_Account_Dashboard_Block
  • Mage_Customer_Block_Account_Dashboard_Hello
  • Mage_Customer_Block_Account_Dashboard_Info
  • Mage_Customer_Block_Account_Dashboard_Newsletter
  • Mage_Customer_Block_Account_Dashboard_Sidebar
  • Mage_Customer_Block_Account_Forgotpassword
  • Mage_Customer_Block_Account_Navigation
  • Mage_Customer_Block_Account_Resetpassword
  • Mage_Customer_Block_Address_Book
  • Mage_Customer_Block_Address_Edit
  • Mage_Customer_Block_Address_Renderer_Default
  • Mage_Customer_Block_Form_Edit
  • Mage_Customer_Block_Form_Login
  • Mage_Customer_Block_Form_Register
  • Mage_Customer_Block_Newsletter
  • Mage_Customer_Block_Widget_Abstract
  • Mage_Customer_Block_Widget_Dob
  • Mage_Customer_Block_Widget_Gender
  • Mage_Customer_Block_Widget_Name
  • Mage_Customer_Block_Widget_Taxvat
  • Mage_Customer_Helper_Address
  • Mage_Customer_Helper_Data
  • Mage_Customer_Model_Address
  • Mage_Customer_Model_Address_Abstract
  • Mage_Customer_Model_Address_Api
  • Mage_Customer_Model_Address_Api_V2
  • Mage_Customer_Model_Address_Config
  • Mage_Customer_Model_Api2_Customer
  • Mage_Customer_Model_Api2_Customer_Address
  • Mage_Customer_Model_Api2_Customer_Address_Rest
  • Mage_Customer_Model_Api2_Customer_Address_Rest_Admin_V1
  • Mage_Customer_Model_Api2_Customer_Address_Rest_Customer_V1
  • Mage_Customer_Model_Api2_Customer_Address_Validator
  • Mage_Customer_Model_Api2_Customer_Rest
  • Mage_Customer_Model_Api2_Customer_Rest_Admin_V1
  • Mage_Customer_Model_Api2_Customer_Rest_Customer_V1
  • Mage_Customer_Model_Api_Resource
  • Mage_Customer_Model_Attribute
  • Mage_Customer_Model_Attribute_Backend_Data_Boolean
  • Mage_Customer_Model_Attribute_Data
  • Mage_Customer_Model_Attribute_Data_Abstract
  • Mage_Customer_Model_Attribute_Data_Boolean
  • Mage_Customer_Model_Attribute_Data_Date
  • Mage_Customer_Model_Attribute_Data_File
  • Mage_Customer_Model_Attribute_Data_Hidden
  • Mage_Customer_Model_Attribute_Data_Image
  • Mage_Customer_Model_Attribute_Data_Multiline
  • Mage_Customer_Model_Attribute_Data_Multiselect
  • Mage_Customer_Model_Attribute_Data_Postcode
  • Mage_Customer_Model_Attribute_Data_Select
  • Mage_Customer_Model_Attribute_Data_Text
  • Mage_Customer_Model_Attribute_Data_Textarea
  • Mage_Customer_Model_Config_Share
  • Mage_Customer_Model_Convert_Adapter_Customer
  • Mage_Customer_Model_Convert_Parser_Customer
  • Mage_Customer_Model_Customer
  • Mage_Customer_Model_Customer_Api
  • Mage_Customer_Model_Customer_Api_V2
  • Mage_Customer_Model_Customer_Attribute_Backend_Billing
  • Mage_Customer_Model_Customer_Attribute_Backend_Password
  • Mage_Customer_Model_Customer_Attribute_Backend_Shipping
  • Mage_Customer_Model_Customer_Attribute_Backend_Store
  • Mage_Customer_Model_Customer_Attribute_Backend_Website
  • Mage_Customer_Model_Customer_Attribute_Source_Group
  • Mage_Customer_Model_Customer_Attribute_Source_Store
  • Mage_Customer_Model_Customer_Attribute_Source_Website
  • Mage_Customer_Model_Entity_Address
  • Mage_Customer_Model_Entity_Address_Attribute_Backend_Region
  • Mage_Customer_Model_Entity_Address_Attribute_Backend_Street
  • Mage_Customer_Model_Entity_Address_Attribute_Collection
  • Mage_Customer_Model_Entity_Address_Attribute_Source_Country
  • Mage_Customer_Model_Entity_Address_Attribute_Source_Region
  • Mage_Customer_Model_Entity_Address_Collection
  • Mage_Customer_Model_Entity_Attribute
  • Mage_Customer_Model_Entity_Attribute_Collection
  • Mage_Customer_Model_Entity_Customer
  • Mage_Customer_Model_Entity_Customer_Collection
  • Mage_Customer_Model_Entity_Form_Attribute
  • Mage_Customer_Model_Entity_Form_Attribute_Collection
  • Mage_Customer_Model_Entity_Group
  • Mage_Customer_Model_Entity_Group_Collection
  • Mage_Customer_Model_Entity_Setup
  • Mage_Customer_Model_Entity_Wishlist_Collection
  • Mage_Customer_Model_Form
  • Mage_Customer_Model_Group
  • Mage_Customer_Model_Group_Api
  • Mage_Customer_Model_Group_Api_V2
  • Mage_Customer_Model_Observer
  • Mage_Customer_Model_Resource_Address
  • Mage_Customer_Model_Resource_Address_Attribute_Backend_Region
  • Mage_Customer_Model_Resource_Address_Attribute_Backend_Street
  • Mage_Customer_Model_Resource_Address_Attribute_Collection
  • Mage_Customer_Model_Resource_Address_Attribute_Source_Country
  • Mage_Customer_Model_Resource_Address_Attribute_Source_Region
  • Mage_Customer_Model_Resource_Address_Collection
  • Mage_Customer_Model_Resource_Attribute
  • Mage_Customer_Model_Resource_Attribute_Collection
  • Mage_Customer_Model_Resource_Customer
  • Mage_Customer_Model_Resource_Customer_Collection
  • Mage_Customer_Model_Resource_Form_Attribute
  • Mage_Customer_Model_Resource_Form_Attribute_Collection
  • Mage_Customer_Model_Resource_Group
  • Mage_Customer_Model_Resource_Group_Collection
  • Mage_Customer_Model_Resource_Setup
  • Mage_Customer_Model_Resource_Wishlist_Collection
  • Mage_Customer_Model_Session
  • Mage_Customer_ReviewController

Interfaces

  • Mage_Customer_Block_Address_Renderer_Interface

Exceptions

  • Mage_Customer_Exception
  • Overview
  • Package
  • Class
  • Tree

Class Mage_Customer_Model_Customer

Customer model

Varien_Object
Extended by Mage_Core_Model_Abstract
Extended by Mage_Customer_Model_Customer
Package: Mage\Customer
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Customer/Model/Customer.php
Methods summary
public
# _construct( )

Initialize customer model

Initialize customer model

public Mage_Customer_Model_Config_Share
# getSharingConfig( )

Retrieve customer sharing configuration model

Retrieve customer sharing configuration model

Returns

Mage_Customer_Model_Config_Share
public true
# authenticate( string $login, string $password )

Authenticate customer

Authenticate customer

Parameters

$login
string
$login
$password
string
$password

Returns

true

Throws

Mage_Core_Exception
public Mage_Customer_Model_Customer
# loadByEmail( string $customerEmail )

Load customer by email

Load customer by email

Parameters

$customerEmail
string
$customerEmail

Returns

Mage_Customer_Model_Customer
protected Mage_Customer_Model_Customer
# _beforeSave( )

Processing object before save data

Processing object before save data

Returns

Mage_Customer_Model_Customer

Overrides

Mage_Core_Model_Abstract::_beforeSave()
public Mage_Customer_Model_Customer
# changePassword( string $newPassword )

Change customer password

Change customer password

Parameters

$newPassword
string
$newPassword

Returns

Mage_Customer_Model_Customer
public string
# getName( )

Get full customer name

Get full customer name

Returns

string
public Mage_Customer_Model_Customer
# addAddress( Mage_Customer_Model_Address $address )

Add address to address collection

Add address to address collection

Parameters

$address
Mage_Customer_Model_Address
$address

Returns

Mage_Customer_Model_Customer
public Mage_Customer_Model_Address
# getAddressById( integer $addressId )

Retrieve customer address by address id

Retrieve customer address by address id

Parameters

$addressId
integer
$addressId

Returns

Mage_Customer_Model_Address
public Mage_Customer_Model_Address
# getAddressItemById( integer $addressId )

Getting customer address object from collection by identifier

Getting customer address object from collection by identifier

Parameters

$addressId
integer
$addressId

Returns

Mage_Customer_Model_Address
public Mage_Customer_Model_Entity_Address_Collection
# getAddressCollection( )

Retrieve not loaded address collection

Retrieve not loaded address collection

Returns

Mage_Customer_Model_Entity_Address_Collection
public Mage_Customer_Model_Entity_Address_Collection
# getAddressesCollection( )

Customer addresses collection

Customer addresses collection

Returns

Mage_Customer_Model_Entity_Address_Collection
public array
# getAddresses( )

Retrieve customer address array

Retrieve customer address array

Returns

array
public array
# getAttributes( )

Retrieve all customer attributes

Retrieve all customer attributes

Returns

array
public Mage_Customer_Model_Entity_Attribute
# getAttribute( string $attributeCode )

Get customer attribute model object

Get customer attribute model object

Parameters

$attributeCode
string
$attributeCode

Returns

Mage_Customer_Model_Entity_Attribute
| null
public Mage_Customer_Model_Customer
# setPassword( string $password )

Set plain and hashed password

Set plain and hashed password

Parameters

$password
string
$password

Returns

Mage_Customer_Model_Customer
public string
# hashPassword( string $password, integer $salt = null )

Hash customer password

Hash customer password

Parameters

$password
string
$password
$salt
integer
$salt

Returns

string
public string
# generatePassword( integer $length = 8 )

Retrieve random password

Retrieve random password

Parameters

$length
integer
$length

Returns

string
public boolean
# validatePassword( string $password )

Validate password with salted hash

Validate password with salted hash

Parameters

$password
string
$password

Returns

boolean
public string
# encryptPassword( string $password )

Encrypt password

Encrypt password

Parameters

$password
string
$password

Returns

string
public string
# decryptPassword( string $password )

Decrypt password

Decrypt password

Parameters

$password
string
$password

Returns

string
public Mage_Customer_Model_Address
# getPrimaryAddress( string $attributeCode )

Retrieve default address by type(attribute)

Retrieve default address by type(attribute)

Parameters

$attributeCode
string
$attributeCode address type attribute code

Returns

Mage_Customer_Model_Address
public Mage_Customer_Model_Address
# getPrimaryBillingAddress( )

Get customer default billing address

Get customer default billing address

Returns

Mage_Customer_Model_Address
public Mage_Customer_Model_Address
# getDefaultBillingAddress( )

Get customer default billing address

Get customer default billing address

Returns

Mage_Customer_Model_Address
public Mage_Customer_Model_Address
# getPrimaryShippingAddress( )

Get default customer shipping address

Get default customer shipping address

Returns

Mage_Customer_Model_Address
public Mage_Customer_Model_Address
# getDefaultShippingAddress( )

Get default customer shipping address

Get default customer shipping address

Returns

Mage_Customer_Model_Address
public array
# getPrimaryAddressIds( )

Retrieve ids of default addresses

Retrieve ids of default addresses

Returns

array
public array
# getPrimaryAddresses( )

Retrieve all customer default addresses

Retrieve all customer default addresses

Returns

array
public array
# getAdditionalAddresses( )

Retrieve not default addresses

Retrieve not default addresses

Returns

array
public boolean
# isAddressPrimary( Mage_Customer_Model_Address $address )

Check if address is primary

Check if address is primary

Parameters

$address
Mage_Customer_Model_Address
$address

Returns

boolean
public Mage_Customer_Model_Customer
# sendNewAccountEmail( string $type = 'registered', string $backUrl = '', string $storeId = '0' )

Send email with new account related information

Send email with new account related information

Parameters

$type
string
$type
$backUrl
string
$backUrl
$storeId
string
$storeId

Returns

Mage_Customer_Model_Customer

Throws

Mage_Core_Exception
public boolean
# isConfirmationRequired( )

Check if accounts confirmation is required in config

Check if accounts confirmation is required in config

Returns

boolean
public string
# getRandomConfirmationKey( )

Generate random confirmation key

Generate random confirmation key

Returns

string
public Mage_Customer_Model_Customer
# sendPasswordReminderEmail( )

Send email with new customer password

Send email with new customer password

Returns

Mage_Customer_Model_Customer
protected Mage_Customer_Model_Customer
# _sendEmailTemplate( string $template, string $sender, array $templateParams = array(), integer|null $storeId = null )

Send corresponding email template

Send corresponding email template

Parameters

$template
string
$emailTemplate configuration path of email template
$sender
string
$emailSender configuration path of email identity
$templateParams
array
$templateParams
$storeId
integer|null
$storeId

Returns

Mage_Customer_Model_Customer
public Mage_Customer_Model_Customer
# sendPasswordResetConfirmationEmail( )

Send email with reset password confirmation link

Send email with reset password confirmation link

Returns

Mage_Customer_Model_Customer
public integer
# getGroupId( )

Retrieve customer group identifier

Retrieve customer group identifier

Returns

integer
public integer
# getTaxClassId( )

Retrieve customer tax class identifier

Retrieve customer tax class identifier

Returns

integer
public boolean
# isInStore( Mage_Core_Model_Store $store )

Check store availability for customer

Check store availability for customer

Parameters

$store
Mage_Core_Model_Store
| int $store

Returns

boolean
public Mage_Core_Model_Store
# getStore( )

Retrieve store where customer was created

Retrieve store where customer was created

Returns

Mage_Core_Model_Store
public array
# getSharedStoreIds( )

Retrieve shared store ids

Retrieve shared store ids

Returns

array
public array
# getSharedWebsiteIds( )

Retrive shared website ids

Retrive shared website ids

Returns

array
public Mage_Customer_Model_Customer
# setStore( Mage_Core_Model_Store $store )

Set store to customer

Set store to customer

Parameters

$store
Mage_Core_Model_Store
$store

Returns

Mage_Customer_Model_Customer
public boolean
# validate( )

Validate customer attribute values. For existing customer password + confirmation will be validated only when password is set (i.e. its change is requested)

Validate customer attribute values. For existing customer password + confirmation will be validated only when password is set (i.e. its change is requested)

Returns

boolean
public Mage_Customer_Model_Customer
# importFromTextArray( array $row )

Import customer data from text array

Import customer data from text array

Parameters

$row
array
$row

Returns

Mage_Customer_Model_Customer
public Mage_Customer_Model_Customer
# unsetSubscription( )

Unset subscription

Unset subscription

Returns

Mage_Customer_Model_Customer
public Mage_Customer_Model_Customer
# cleanAllAddresses( )

Clean all addresses

Clean all addresses

Returns

Mage_Customer_Model_Customer
public Mage_Customer_Model_Customer
# addError( mixed $error )

Add error

Add error

Returns

Mage_Customer_Model_Customer
public array
# getErrors( )

Retreive errors

Retreive errors

Returns

array
public Mage_Customer_Model_Customer
# resetErrors( )

Reset errors array

Reset errors array

Returns

Mage_Customer_Model_Customer
public boolean
# printError( mixed $error, mixed $line = null )

Print error

Print error

Parameters

$error
mixed
$error
$line
mixed
$line

Returns

boolean
public boolean
# validateAddress( array $data, string $type = 'billing' )

Validate address

Validate address

Parameters

$data
array
$data
$type
string
$type

Returns

boolean
protected Mage_Core_Model_Abstract
# _beforeDelete( )

Prepare customer for delete

Prepare customer for delete

Returns

Mage_Core_Model_Abstract

Overrides

Mage_Core_Model_Abstract::_beforeDelete()
public integer|null
# getCreatedAtTimestamp( )

Get customer created at date timestamp

Get customer created at date timestamp

Returns

integer|null
public Mage_Customer_Model_Customer
# reset( )

Reset all model data

Reset all model data

Returns

Mage_Customer_Model_Customer
public boolean
# isDeleteable( )

Checks model is deleteable

Checks model is deleteable

Returns

boolean
public Mage_Customer_Model_Customer
# setIsDeleteable( boolean $value )

Set is deleteable flag

Set is deleteable flag

Parameters

$value
boolean
$value

Returns

Mage_Customer_Model_Customer
public boolean
# isReadonly( )

Checks model is readonly

Checks model is readonly

Returns

boolean
public Mage_Customer_Model_Customer
# setIsReadonly( boolean $value )

Set is readonly flag

Set is readonly flag

Parameters

$value
boolean
$value

Returns

Mage_Customer_Model_Customer
public boolean
# canSkipConfirmation( )

Check whether confirmation may be skipped when registering using certain email address

Check whether confirmation may be skipped when registering using certain email address

Returns

boolean
public
# __clone( )

Clone current object

Clone current object

public Mage_Eav_Model_Entity_Type
# getEntityType( )

Return Entity Type instance

Return Entity Type instance

Returns

Mage_Eav_Model_Entity_Type
public integer
# getEntityTypeId( )

Return Entity Type ID

Return Entity Type ID

Returns

integer
protected integer
# _getWebsiteStoreId( integer|string|null $defaultStoreId = null )

Get either first store ID from a set website or the provided as default

Get either first store ID from a set website or the provided as default

Parameters

$defaultStoreId
integer|string|null
$storeId

Returns

integer
public Mage_Customer_Model_Customer
# changeResetPasswordLinkToken( string $newResetPasswordLinkToken )

Change reset password link token

Change reset password link token

Stores new reset password link token

Parameters

$newResetPasswordLinkToken
string
$newResetPasswordLinkToken

Returns

Mage_Customer_Model_Customer
public boolean
# isResetPasswordLinkTokenExpired( )

Check if current reset password link token is expired

Check if current reset password link token is expired

Returns

boolean
Methods inherited from Mage_Core_Model_Abstract
_afterDelete(), _afterDeleteCommit(), _afterLoad(), _afterSave(), _beforeLoad(), _clearData(), _clearReferences(), _getEventData(), _getResource(), _hasModelChanged(), _init(), _protectFromNonAdmin(), _setResourceModel(), afterCommitCallback(), afterLoad(), cleanModelCache(), clearInstance(), delete(), getCacheIdTags(), getCacheTags(), getCollection(), getEntityId(), getId(), getIdFieldName(), getResource(), getResourceCollection(), getResourceName(), isObjectNew(), load(), save(), setId()
Constants summary
string XML_PATH_REGISTER_EMAIL_TEMPLATE 'customer/create_account/email_template'
#

Configuration pathes for email templates and identities

Configuration pathes for email templates and identities

string XML_PATH_REGISTER_EMAIL_IDENTITY 'customer/create_account/email_identity'
#
string XML_PATH_REMIND_EMAIL_TEMPLATE 'customer/password/remind_email_template'
#
string XML_PATH_FORGOT_EMAIL_TEMPLATE 'customer/password/forgot_email_template'
#
string XML_PATH_FORGOT_EMAIL_IDENTITY 'customer/password/forgot_email_identity'
#
string XML_PATH_DEFAULT_EMAIL_DOMAIN 'customer/create_account/email_domain'
#
string XML_PATH_IS_CONFIRM 'customer/create_account/confirm'
#
string XML_PATH_CONFIRM_EMAIL_TEMPLATE 'customer/create_account/email_confirmation_template'
#
string XML_PATH_CONFIRMED_EMAIL_TEMPLATE 'customer/create_account/email_confirmed_template'
#
string XML_PATH_GENERATE_HUMAN_FRIENDLY_ID 'customer/create_account/generate_human_friendly_id'
#
integer EXCEPTION_EMAIL_NOT_CONFIRMED 1
#

Codes of exceptions related to customer model

Codes of exceptions related to customer model

integer EXCEPTION_INVALID_EMAIL_OR_PASSWORD 2
#
integer EXCEPTION_EMAIL_EXISTS 3
#
integer EXCEPTION_INVALID_RESET_PASSWORD_LINK_TOKEN 4
#
string SUBSCRIBED_YES 'yes'
#
string SUBSCRIBED_NO 'no'
#
Properties summary
protected string $_eventPrefix 'customer'
#

Model event prefix

Model event prefix

protected string $_eventObject 'customer'
#

Name of the event object

Name of the event object

protected array $_errors array()
#

List of errors

List of errors

protected array $_attributes
#

Assoc array of customer attributes

Assoc array of customer attributes

protected Mage_Customer_Model_Entity_Address_Collection $_addressesCollection
#

Customer addresses collection

Customer addresses collection

protected boolean $_isDeleteable true
#

Is model deleteable

Is model deleteable

protected boolean $_isReadonly false
#

Is model readonly

Is model readonly

private static boolean $_isConfirmationRequired
#

Confirmation requirement flag

Confirmation requirement flag

Properties inherited from Mage_Core_Model_Abstract
$_cacheTag, $_dataSaveAllowed, $_isObjectNew, $_resource, $_resourceCollectionName, $_resourceName
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0