UNA
BxDolAccountQuery Class Reference
Inheritance diagram for BxDolAccountQuery:
BxDolDb iBxDolSingleton BxDolFactory iBxDolSingleton

Public Member Functions

 __clone ()
 
 getInfoById ( $iID)
 
 getIdByEmail ($sEmail)
 
 getIdByPhone ($sPhone)
 
 getIdById ($iId, $bClearCache=false)
 
 getStudioOperatorId ()
 
 getEmail ($iID)
 
 getPassword ($iID)
 
 isOnline ($iId)
 
 updatePassword ($sPasswordHash, $sSalt, $iAccountId, $iPasswordExpired)
 
 logPassword ($iAccountId)
 
 updateLoggedIn ($iID)
 
 updateAttemptsCounter ($iID)
 
 lockAccount ($iID)
 
 unlockAccount ($iID)
 
 updateLanguage ($iID, $iLangId)
 
 updateCurrentProfile ($iID, $iProfileId)
 
 updateEmailConfirmed ($isConfirmed, $iID)
 
 updatePhoneConfirmed ($isConfirmed, $iID)
 
 updatePhone ($sPhone, $iID)
 
 _updateField ($iId, $sFieldForUpdate, $sValue)
 
 delete ($iID)
 
 getAccounts ($aParams)
 
 searchByTerm ($sTerm, $iLimit)
 
- Public Member Functions inherited from BxDolDb
 __clone ()
 
 connect ()
 
 disconnect ()
 
 ping ()
 
 pdoExec ($sQuery)
 
 pdoQuery ($sQuery)
 
 pdoExceptionHandler ($oException)
 
 getOption ($sName)
 
 getOne ($oStatement, $aBindings=array(), $iIndex=0)
 
 getRow ($oStatement, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 getColumn ($oStatement, $aBindings=array(), $iFetchColumnNumber=0)
 
 getFirstRow ($oStatement, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 getNextRow ($iFetchType=PDO::FETCH_ASSOC)
 
 getAll ($oStatement, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 fillArray ($oStatement, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 getAllWithKey ($oStatement, $sFieldKey, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 getPairs ($oStatement, $sFieldKey, $sFieldValue, $aBindings=array(), $iFetchType=PDO::FETCH_ASSOC)
 
 getNumRows ($oStatement=null)
 
 getAffectedRows ($oStatement=null)
 
 query ($oStatement, $aBindings=array(), $bVerbose=null)
 
 res ($oStatement, $aBindings=array(), $bVerbose=null)
 
 getServerInfo ()
 
 getVersion ()
 
 listTables ()
 
 getDbCacheObject ()
 
 escape ($s)
 
 implode_escape ($mixed)
 
 unescape ($mixed)
 
 prepare ($sQuery)
 
 prepareAsString ($sQuery)
 
 arrayToSQL ($a, $sDiv=',', $sOperator='=', $bWildcardSpaceChars=false)
 

Static Public Member Functions

static getInstance ()
 
- Static Public Member Functions inherited from BxDolDb
static getInstance ()
 

Protected Member Functions

 _getDataByField ($sField, $sValue)
 
 _getFieldByField ($sFieldRequested, $sFieldSearch, $sValue)
 
- Protected Member Functions inherited from BxDolDb
 __construct ($aDbConf=false)
 

Detailed Description

All queries related to account

Member Function Documentation

◆ __clone()

BxDolAccountQuery::__clone ( )

Prevent cloning the instance

◆ _getDataByField()

BxDolAccountQuery::_getDataByField (   $sField,
  $sValue 
)
protected

Get account by specified field name and value. It is for internal usage only. Use other funtions to get account info, like getInfoById, etc.

Parameters
string$sFielddatabase field name
mixed$sValuedatabase field value
Returns
array with porfile info

◆ _getFieldByField()

BxDolAccountQuery::_getFieldByField (   $sFieldRequested,
  $sFieldSearch,
  $sValue 
)
protected

Get account field by specified field name and value. In most cases it is for internal usage only. Use other funtions to get account info, like getIdByEmail, etc.

Parameters
string$sFieldRequesteddatabase field name to return
string$sFieldSearchdatabase field name to search for
mixed$sValuedatabase field value
Returns
specified account field value

◆ _updateField()

BxDolAccountQuery::_updateField (   $iId,
  $sFieldForUpdate,
  $sValue 
)

Update some field by account id In most cases it is for internal usage only. Use other funtions to get account info, like updateLogged, etc.

Parameters
string$sFieldRequesteddatabase field name to return
string$sFieldSearchdatabase field name to search for
mixed$sValuedatabase field value
Returns
specified account field value

◆ delete()

BxDolAccountQuery::delete (   $iID)

Delete account info by id

Parameters
int$iIDprofile id
Returns
affected rows

◆ getAccounts()

BxDolAccountQuery::getAccounts (   $aParams)

Get account(s) by params

Parameters
array$aParamsbrowse params
Returns
array with account(s)

◆ getEmail()

BxDolAccountQuery::getEmail (   $iID)

Get account email by id

Parameters
string$ssearch account by this id
Returns
account email

◆ getIdByEmail()

BxDolAccountQuery::getIdByEmail (   $sEmail)

get account id by emial

◆ getIdById()

BxDolAccountQuery::getIdById (   $iId,
  $bClearCache = false 
)

get account id by id

◆ getIdByPhone()

BxDolAccountQuery::getIdByPhone (   $sPhone)

get account id by phone

◆ getInfoById()

BxDolAccountQuery::getInfoById (   $iID)

Get account info by id

Parameters
int$iIDaccount id
Returns
array with account info

◆ getInstance()

static BxDolAccountQuery::getInstance ( )
static

Get singleton instance of the class

Implements iBxDolSingleton.

◆ getPassword()

BxDolAccountQuery::getPassword (   $iID)

Get account password by id

Parameters
string$ssearch account by this id
Returns
account password

◆ getStudioOperatorId()

BxDolAccountQuery::getStudioOperatorId ( )

get first studio operator id

◆ isOnline()

BxDolAccountQuery::isOnline (   $iId)

Is account online by id

Parameters
int$iIdaccount id
Returns
account online status

◆ lockAccount()

BxDolAccountQuery::lockAccount (   $iID)

Lock account

Parameters
int$iIDaccount id
Returns
number of affected rows

◆ logPassword()

BxDolAccountQuery::logPassword (   $iAccountId)

Save password log

Parameters
$sPasswordHash- password hash
$sSalt- pasword salt
$iAccountId- account id to update password for
Returns
number of affected rows

◆ searchByTerm()

BxDolAccountQuery::searchByTerm (   $sTerm,
  $iLimit 
)

Search account profile by keyword

◆ unlockAccount()

BxDolAccountQuery::unlockAccount (   $iID)

Unlock account

Parameters
int$iIDaccount id
Returns
number of affected rows

◆ updateAttemptsCounter()

BxDolAccountQuery::updateAttemptsCounter (   $iID)

Update login attempts counter

Parameters
int$iIDaccount id
Returns
number of affected rows

◆ updateCurrentProfile()

BxDolAccountQuery::updateCurrentProfile (   $iID,
  $iProfileId 
)

Update current profile id associated with account

Parameters
int$iIDaccount id
int$iProfileIdset current profile id to this value
Returns
number of affected rows

◆ updateEmailConfirmed()

BxDolAccountQuery::updateEmailConfirmed (   $isConfirmed,
  $iID 
)

Update 'email_confirmed' field.

Parameters
int$isConfirmed- 0: mark email as unconfirmed, 1: as confirmed
int$iID- account id
Returns
number of affected rows

◆ updateLanguage()

BxDolAccountQuery::updateLanguage (   $iID,
  $iLangId 
)

Update language

Parameters
int$iIDaccount id
Returns
number of affected rows

◆ updateLoggedIn()

BxDolAccountQuery::updateLoggedIn (   $iID)

Update last logged in time

Parameters
int$iIDaccount id
Returns
number of affected rows

◆ updatePassword()

BxDolAccountQuery::updatePassword (   $sPasswordHash,
  $sSalt,
  $iAccountId,
  $iPasswordExpired 
)

Update password

Parameters
$sPasswordHash- password hash
$sSalt- pasword salt
$iAccountId- account id to update password for
Returns
number of affected rows

◆ updatePhone()

BxDolAccountQuery::updatePhone (   $sPhone,
  $iID 
)

Update 'phone' field.

Parameters
int$sPhone- phone number
int$iID- account id
Returns
number of affected rows

◆ updatePhoneConfirmed()

BxDolAccountQuery::updatePhoneConfirmed (   $isConfirmed,
  $iID 
)

Update 'phone_confirmed' field.

Parameters
int$isConfirmed- 0: mark phone as unconfirmed, 1: as confirmed
int$iID- account id
Returns
number of affected rows

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