UNA
Loading...
Searching...
No Matches
BxDolAccount Class Reference
Inheritance diagram for BxDolAccount:
BxDolFactory iBxDolSingleton

Public Member Functions

 __clone ()
 
 id ()
 
 isConfirmed ($iAccountId=false)
 
 getCurrentConfirmationStatusValue ($iAccountId=false)
 
 isConfirmedEmail ($iAccountId=false)
 
 isConfirmedPhone ($iAccountId=false)
 
 isLocked ($iAccountId=false)
 
 updateEmailConfirmed ($isConfirmed, $isAutoSendConfrmationEmail=true, $iAccountId=false)
 
 updatePhoneConfirmed ($isConfirmed, $iAccountId=false)
 
 updatePassword ($sPassword, $iAccountId=false)
 
 updatePhone ($sPhone, $iAccountId=false)
 
 updateProfileContextAuto ($iProfileIdFilterOut=false, $iAccountId=false)
 
 updateProfileContext ($iSwitchToProfileId, $iAccountId=false)
 
 sendConfirmationEmail ($iAccountId=false)
 
 sendResetPasswordEmail ($iAccountId=false)
 
 getInfo ($iAccountId=false)
 
 getDisplayName ($iAccountId=false)
 
 getUrl ($iAccountId=false)
 
 getUnit ($iAccountId=false, $aParams=array())
 
 getPicture ($iAccountId=false)
 
 getAvatarBig ($iAccountId=false)
 
 getAvatar ($iAccountId=false)
 
 getThumb ($iAccountId=false)
 
 getIcon ($iAccountId=false)
 
 getEmail ($iAccountId=false)
 
 getLanguageId ($iAccountId=false)
 
 isOnline ($iAccountId=false)
 
 isProfilesLimitReached ()
 
 getProfilesNumber ($isFilterNonSwitchableProfiles=true)
 
 getProfilesIds ($isFilterNonSwitchableProfiles=true, $isFilterSystemProfiles=true)
 
 getProfiles ($isFilterNonSwitchableProfiles=true, $isFilterSystemProfiles=true)
 
 delete ($bDeleteWithContent=false)
 
 addInformerPermanentMessages ($oInformer)
 
 getUnsubscribeLink ($iEmailType, $iAccountId=false)
 
 getEmailHash ($iAccountId=false)
 
 getPasswordExpiredDate ($iPasswordExpiredForMembership, $iAccountId=false)
 
 getPasswordExpiredDateByAccount ($iAccountId=false)
 
 isNeedChangePassword ($iAccountId=false)
 
 doAudit ($iAccountId, $sAction, $aData=array())
 

Static Public Member Functions

static getInstance ($mixedAccountId=false, $bClearCache=false)
 
static getInstanceStudioOperator ()
 
static isNeedConfirmEmail ()
 
static isNeedConfirmPhone ()
 
static getID ($s)
 
static isAllowedCreate ($iProfileId, $isPerformAction=false)
 
static isAllowedCreateMultiple ($iProfileId, $isPerformAction=false)
 
static isAllowedEdit ($iProfileId, $aContentInfo, $isPerformAction=false)
 
static isAllowedDelete ($iProfileId, $aContentInfo, $isPerformAction=false)
 
static pruning ()
 
- Static Public Member Functions inherited from iBxDolSingleton
static getInstance ()
 

Protected Member Functions

 __construct ($iAccountId)
 

Protected Attributes

 $_iAccountID
 
 $_aInfo
 
 $_oQuery
 

Constructor & Destructor Documentation

◆ __construct()

BxDolAccount::__construct ( $iAccountId)
protected

Constructor

Member Function Documentation

◆ __clone()

BxDolAccount::__clone ( )

Prevent cloning the instance

◆ addInformerPermanentMessages()

BxDolAccount::addInformerPermanentMessages ( $oInformer)

Add permament messages.

◆ delete()

BxDolAccount::delete ( $bDeleteWithContent = false)

Delete profile.

Parameters
$bDeleteWithContent- delete associated profiles with all its contents

Hooks:

'account', 'before_delete' - hook on before delete account,

  • $unit_name - equals account
  • $action - equals before_delete
  • $object_id - account id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

Hooks:

'account', 'delete' - hook on after delete account

  • $unit_name - equals account
  • $action - equals delete
  • $object_id - account id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

◆ getAvatar()

BxDolAccount::getAvatar ( $iAccountId = false)

Get avatar url

◆ getAvatarBig()

BxDolAccount::getAvatarBig ( $iAccountId = false)

Get big (2x) avatar url

◆ getDisplayName()

BxDolAccount::getDisplayName ( $iAccountId = false)

Get account display name

Hooks:

'account', 'account_name' - hook on get account display name

  • $unit_name - equals account
  • $action - equals account_name
  • $object_id - account id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

◆ getEmail()

BxDolAccount::getEmail ( $iAccountId = false)

Get account email

◆ getIcon()

BxDolAccount::getIcon ( $iAccountId = false)

Get icon picture url

◆ getID()

static BxDolAccount::getID ( $s)
static

Validate account.

Parameters
$s- account identifier (id or email)
Returns
account id or false if account was not found

◆ getInfo()

BxDolAccount::getInfo ( $iAccountId = false)

Get account info

◆ getInstance()

static BxDolAccount::getInstance ( $mixedAccountId = false,
$bClearCache = false )
static

Get singleton instance of the class

◆ getInstanceStudioOperator()

static BxDolAccount::getInstanceStudioOperator ( )
static

Get studio operator account singleton instance on the class

◆ getLanguageId()

BxDolAccount::getLanguageId ( $iAccountId = false)

Get language ID

◆ getPicture()

BxDolAccount::getPicture ( $iAccountId = false)

Get picture url

◆ getProfiles()

BxDolAccount::getProfiles ( $isFilterNonSwitchableProfiles = true,
$isFilterSystemProfiles = true )

Get all profiles associated with the account

◆ getProfilesIds()

BxDolAccount::getProfilesIds ( $isFilterNonSwitchableProfiles = true,
$isFilterSystemProfiles = true )

Get all profile ids associated with the account

◆ getProfilesNumber()

BxDolAccount::getProfilesNumber ( $isFilterNonSwitchableProfiles = true)

Get number of profiles associated with the account

◆ getThumb()

BxDolAccount::getThumb ( $iAccountId = false)

Get thumb picture url

◆ getUnit()

BxDolAccount::getUnit ( $iAccountId = false,
$aParams = array() )

Get account url

◆ getUnsubscribeLink()

BxDolAccount::getUnsubscribeLink ( $iEmailType,
$iAccountId = false )

Get unsubscribe link for the specified mesage type

◆ getUrl()

BxDolAccount::getUrl ( $iAccountId = false)

Get account url

◆ id()

BxDolAccount::id ( )

Get account id

◆ isAllowedCreate()

static BxDolAccount::isAllowedCreate ( $iProfileId,
$isPerformAction = false )
static
Returns
CHECK_ACTION_RESULT_ALLOWED if access is granted or error message if access is forbidden.

◆ isAllowedCreateMultiple()

static BxDolAccount::isAllowedCreateMultiple ( $iProfileId,
$isPerformAction = false )
static

Hooks:

'profile', 'allow_create_another_profile' - hook on check allow create profile

◆ isAllowedDelete()

static BxDolAccount::isAllowedDelete ( $iProfileId,
$aContentInfo,
$isPerformAction = false )
static
Returns
CHECK_ACTION_RESULT_ALLOWED if access is granted or error message if access is forbidden.

◆ isAllowedEdit()

static BxDolAccount::isAllowedEdit ( $iProfileId,
$aContentInfo,
$isPerformAction = false )
static
Returns
CHECK_ACTION_RESULT_ALLOWED if access is granted or error message if access is forbidden.

◆ isConfirmed()

BxDolAccount::isConfirmed ( $iAccountId = false)

Check if account is confirmed, it is checked by email confirmation

Hooks:

'account', 'is_confirmed' - hook in $oAccount->isConfirmed check

  • $unit_name - equals account
  • $action - equals is_confirmed
  • $object_id - account id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

◆ isConfirmedEmail()

BxDolAccount::isConfirmedEmail ( $iAccountId = false)

Hooks:

'account', 'is_confirmed' - hook in $oAccount->isConfirmed check

  • $unit_name - equals account
  • $action - equals is_confirmed_email
  • $object_id - account id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:
    • override_result - [bool] by ref, if email confirmed = true, otherwise false, can be overridden in hook processing
      HOOKS
      hook-account-is_confirmed_email

◆ isConfirmedPhone()

BxDolAccount::isConfirmedPhone ( $iAccountId = false)

Hooks:

'account', 'is_confirmed_phone' - hook in $oAccount->isConfirmedPhone check

◆ isNeedChangePassword()

BxDolAccount::isNeedChangePassword ( $iAccountId = false)

Hooks:

'account', 'is_need_to_change_password' - hook on after delete account

  • $unit_name - equals account
  • $action - equals is_need_to_change_password
  • $object_id - account id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

◆ isOnline()

BxDolAccount::isOnline ( $iAccountId = false)

Is account online

◆ isProfilesLimitReached()

BxDolAccount::isProfilesLimitReached ( )

Check if profiles limit reached

Hooks:

'account', 'get_limit_profiles_number' - hook on get account limit on the number of profiles

◆ sendConfirmationEmail()

BxDolAccount::sendConfirmationEmail ( $iAccountId = false)

Send "confirmation" email

◆ updateEmailConfirmed()

BxDolAccount::updateEmailConfirmed ( $isConfirmed,
$isAutoSendConfrmationEmail = true,
$iAccountId = false )

Set account email to confirmed or unconfirmed

Parameters
int$isConfirmed- false: mark email as unconfirmed, true: as confirmed
int$iAccountId- optional account id
Returns
true on success or false on error

Hooks:

'account', 'confirm' - hook in email confirmation $oAccount->updateEmailConfirmed

◆ updatePassword()

BxDolAccount::updatePassword ( $sPassword,
$iAccountId = false )

Change account password

Parameters
string$sPassword- new password
int$iAccountId- optional account id
Returns
true on success or false on error

Hooks:

'account', 'edited' - hook on account edited $oAccount->updatePassword

◆ updatePhone()

BxDolAccount::updatePhone ( $sPhone,
$iAccountId = false )

Set account phone

Parameters
string$sPhone- phone number
int$iAccountId- optional account id
Returns
true on success or false on error

Hooks:

'account', 'set_phone' - hook after accout password changed

◆ updatePhoneConfirmed()

BxDolAccount::updatePhoneConfirmed ( $isConfirmed,
$iAccountId = false )

Set account phone to confirmed or unconfirmed

Parameters
int$isConfirmed- false: mark phone as unconfirmed, true: as confirmed
int$iAccountId- optional account id
Returns
true on success or false on error

◆ updateProfileContext()

BxDolAccount::updateProfileContext ( $iSwitchToProfileId,
$iAccountId = false )

Hooks:

'account', 'before_switch_context' - hook before switch profile_id frof current logged user

Hooks:

'account', 'switch_context' - hook before switch profile_id frof current logged user

◆ updateProfileContextAuto()

BxDolAccount::updateProfileContextAuto ( $iProfileIdFilterOut = false,
$iAccountId = false )

Switch context automatically to the first available profile

Parameters
$iProfileIdFilterOutprofile ID to exclude from the list of possible profiles
$iAccountIdaccount ID to use istead of current account
Returns
true on success or false on error

The documentation for this class was generated from the following file: