Public Member Functions | |
__construct () | |
setMallUsersStatus ($blOn=false) | |
__get ($sParamName) | |
getNewsSubscription () | |
getUserCountry ($sCountryId=null, $iLang=null) | |
getUserCountryId ($sCountry=null) | |
getUserGroups ($sOXID=null) | |
getUserAddresses ($sUserId=null) | |
setSelectedAddressId ($sAddressId) | |
getSelectedAddressId () | |
getSelectedAddress ($sWishId=false) | |
getUserPayments ($sOXID=null) | |
save () | |
allowDerivedUpdate () | |
inGroup ($sGroupID) | |
delete ($sOXID=null) | |
load ($oxID) | |
exists ($sOXID=null) | |
getOrders ($iLimit=false, $iPage=0) | |
getOrderCount () | |
getNoticeListArtCnt () | |
getWishListArtCnt () | |
getActiveCountry () | |
createUser () | |
addToGroup ($sGroupID) | |
removeFromGroup ($sGroupID=null) | |
onOrderExecute ($oBasket, $iSuccess) | |
getBasket ($sName) | |
convertBirthday ($aData) | |
getBoni () | |
addDynGroup ($sDynGoup, $aDeniedDynGroups) | |
checkValues ($sLogin, $sPassword, $sPassword2, $aInvAddress, $aDelAddress) | |
setNewsSubscription ($blSubscribe, $blSendOptIn) | |
changeUserData ($sUser, $sPassword, $sPassword2, $aInvAddress, $aDelAddress) | |
addUserAddress ($oUser) | |
login ($sUser, $sPassword, $blCookie=false) | |
openIdLogin ($sUser) | |
logout () | |
loadAdminUser () | |
loadActiveUser ($blForceAdmin=false) | |
checkIfEmailExists ($sEmail) | |
getUserRecommLists ($sOXID=null) | |
getRecommListsCount ($sOx=null) | |
checkPassword ($sNewPass, $sConfPass, $blCheckLenght=false) | |
loadUserByUpdateId ($sUid) | |
setUpdateKey ($blReset=false) | |
getUpdateLinkTerm () | |
isExpiredUpdateId ($sKey) | |
getUpdateId () | |
encodePassword ($sPassword, $sSalt) | |
prepareSalt ($sSalt) | |
decodeSalt ($sSaltHex) | |
setPassword ($sPassword=null) | |
isSamePassword ($sNewPass) | |
isLoadedFromCookie () | |
getPasswordHash () | |
getOpenIdPassword ($iLength=25) | |
getReviewUserHash ($sUserId) | |
getReviewUserId ($sReviewUserHash) | |
getState () | |
isTermsAccepted () | |
acceptTerms () | |
setCreditPointsForRegistrant ($sUserId) | |
setCreditPointsForInviter () | |
updateFbId () | |
Static Public Member Functions | |
static | getAdminUser () |
static | getActiveUser ($blForceAdmin=false) |
Protected Member Functions | |
_assignAddress ($aDelAddress) | |
_ldapLogin ($sUser, $sPassword, $sShopID, $sShopSelect) | |
_getUserRights () | |
_setRecordNumber ($sMaxField, $aWhere=null, $iMaxTryCnt=5) | |
_insert () | |
_update () | |
_checkLogin ($sLogin, $aInvAddress) | |
_checkEmail ($sEmail) | |
_checkPassword ($sNewPass, $sConfPass, $blCheckLenght=false) | |
_checkCountries ($aInvAddress, $aDelAddress) | |
_checkRequiredFields ($aInvAddress, $aDelAddress) | |
_checkRequiredArrayFields ($sFieldName, $aFieldValues) | |
_checkVatId ($aInvAddress) | |
_setAutoGroups ($sCountryId) | |
_hasUserAddress ($sUserId) | |
_setUserCookie ($sUser, $sPassword, $sShopId=null, $iTimeout=31536000) | |
_deleteUserCookie ($sShopId=null) | |
Static Protected Member Functions | |
static | _getUserCookie ($sShopId=null) |
Protected Attributes | |
$_blDisableShopCheck = true | |
$_oNewsSubscription = null | |
$_sCoreTbl = 'oxuser' | |
$_sClassName = 'oxuser' | |
$_aBaskets = array() | |
$_oGroups | |
$_aAddresses = array() | |
$_oPayments | |
$_oRecommList | |
$_blMallUsers = false | |
$_iCntNoticeListArticles = null | |
$_iCntWishListArticles = null | |
$_iCntRecommLists = null | |
$_sUpdateKey = null | |
$_blLoadedFromCookie = null | |
Static Protected Attributes | |
static | $_aUserCookie = array() |
User manager. Performs user managing function, as assigning to groups, updating information, deletion and other.
Definition at line 8 of file oxuser.php.
oxUser.__construct | ( | ) |
Class constructor, initiates parent constructor (parent.oxBase()).
Reimplemented from oxBase.
Definition at line 123 of file oxuser.php.
oxUser.__get | ( | $ | sParamName | ) |
Getter for special not frequently used fields
string | $sParamName name of parameter to get value |
Reimplemented from oxBase.
Definition at line 150 of file oxuser.php.
oxUser._assignAddress | ( | $ | aDelAddress | ) | [protected] |
creates new address entry or updates existing
array | $aDelAddress address data array |
Definition at line 1122 of file oxuser.php.
oxUser._checkCountries | ( | $ | aInvAddress, | |
$ | aDelAddress | |||
) | [protected] |
Checks if user defined countries (billing and delivery) are active
array | $aInvAddress billing address info | |
array | $aDelAddress delivery address info |
oxInputException |
Definition at line 1823 of file oxuser.php.
oxUser._checkEmail | ( | $ | sEmail | ) | [protected] |
Checks if email (used as login) is not empty and is valid. On any error exception is thrown.
string | $sEmail user email/login |
Definition at line 1741 of file oxuser.php.
oxUser._checkLogin | ( | $ | sLogin, | |
$ | aInvAddress | |||
) | [protected] |
Checks if user name does not break logics:
string | $sLogin user preferred login name | |
array | $aInvAddress user information |
oxUserException,oxInputException |
Definition at line 1586 of file oxuser.php.
oxUser._checkPassword | ( | $ | sNewPass, | |
$ | sConfPass, | |||
$ | blCheckLenght = false | |||
) | [protected] |
Checking if user password is fine. In case of error exception is thrown
string | $sNewPass new user password | |
string | $sConfPass retyped user password | |
bool | $blCheckLenght option to check password lenght |
oxUserException,oxInputException |
Definition at line 1772 of file oxuser.php.
oxUser._checkRequiredArrayFields | ( | $ | sFieldName, | |
$ | aFieldValues | |||
) | [protected] |
Checks if all values are filled up
strinf | $sFieldName checking field name | |
array | $aFieldValues field values |
oxInputExcpetion | exception |
Definition at line 1916 of file oxuser.php.
oxUser._checkRequiredFields | ( | $ | aInvAddress, | |
$ | aDelAddress | |||
) | [protected] |
Checking if all required fields were filled. In case of error exception is thrown
array | $aInvAddress billing address | |
array | $aDelAddress delivery address |
oxInputExcpetion | exception |
Definition at line 1858 of file oxuser.php.
oxUser._checkVatId | ( | $ | aInvAddress | ) | [protected] |
Checks if user passed VAT id is valid. Exception is thrown if id is not valid
array | $aInvAddress user input array |
oxInputException,oxConnectionException |
Definition at line 1937 of file oxuser.php.
oxUser._deleteUserCookie | ( | $ | sShopId = null |
) | [protected] |
Deletes user cookie data
string | $sShopId shop ID (default null) |
Definition at line 2055 of file oxuser.php.
static oxUser._getUserCookie | ( | $ | sShopId = null |
) | [static, protected] |
Returns cookie stored used login data
string | $sShopId shop ID (default null) |
Definition at line 2069 of file oxuser.php.
oxUser._getUserRights | ( | ) | [protected] |
Returns user rights index. Index cannot be higher than current session user rights index.
Definition at line 1467 of file oxuser.php.
oxUser._hasUserAddress | ( | $ | sUserId | ) | [protected] |
Checks if user allready has user address
object | $sUserId user to check Id |
Definition at line 2015 of file oxuser.php.
oxUser._insert | ( | ) | [protected] |
Inserts user object data to DB. Returns true on success.
Reimplemented from oxBase.
Definition at line 1531 of file oxuser.php.
oxUser._ldapLogin | ( | $ | sUser, | |
$ | sPassword, | |||
$ | sShopID, | |||
$ | sShopSelect | |||
) | [protected] |
oxUser._setAutoGroups | ( | $ | sCountryId | ) | [protected] |
Automatically assigns user to specific groups according to users country information
string | $sCountryId users country id |
Definition at line 1967 of file oxuser.php.
oxUser._setRecordNumber | ( | $ | sMaxField, | |
$ | aWhere = null , |
|||
$ | iMaxTryCnt = 5 | |||
) | [protected] |
Tries to fetch and set next record number in DB. Returns true on success
string | $sMaxField field name where record number is stored | |
array | $aWhere (optional) shop filter add SQL string | |
int | $iMaxTryCnt (optional) max number of tryouts |
Reimplemented from oxBase.
Definition at line 1515 of file oxuser.php.
oxUser._setUserCookie | ( | $ | sUser, | |
$ | sPassword, | |||
$ | sShopId = null , |
|||
$ | iTimeout = 31536000 | |||
) | [protected] |
Sets user info into cookie
string | $sUser user ID | |
string | $sPassword password | |
string | $sShopId shop ID (default null) | |
integer | $iTimeout timeout value (default 31536000) |
Definition at line 2041 of file oxuser.php.
oxUser._update | ( | ) | [protected] |
Updates changed user object data to DB. Returns true on success.
Reimplemented from oxBase.
Definition at line 1549 of file oxuser.php.
oxUser.acceptTerms | ( | ) |
oxUser.addDynGroup | ( | $ | sDynGoup, | |
$ | aDeniedDynGroups | |||
) |
If there is a directove to add user to dynamic group (usually by URL - "dgr=any_group") - tries to add user to it. First checks if passed dynamic group is not in denied group list (defined ar oxConfig.aDeniedDynGroups) and if not - adds user to this group.
string | $sDynGoup deny group (oxSession.getVar( 'dgr' )) | |
array | $aDeniedDynGroups ($myConfig->getConfigParam( 'aDeniedDynGroups' )) |
Definition at line 935 of file oxuser.php.
oxUser.addToGroup | ( | $ | sGroupID | ) |
Adds user to the group
string | $sGroupID group id |
Definition at line 758 of file oxuser.php.
oxUser.addUserAddress | ( | $ | oUser | ) |
Adds new address info to user copied from passed user. Returns new address ID
object | $oUser user object to copy address info |
Definition at line 1088 of file oxuser.php.
oxUser.allowDerivedUpdate | ( | ) |
Overrides parent isDerived check and returns true
Reimplemented from oxBase.
Definition at line 463 of file oxuser.php.
oxUser.changeUserData | ( | $ | sUser, | |
$ | sPassword, | |||
$ | sPassword2, | |||
$ | aInvAddress, | |||
$ | aDelAddress | |||
) |
When changing/updating user information in frontend this method validates user input. If data is fine - automatically assigns this values. Additionally calls methods (oxuser._setAutoGroups, oxuser.setNewsSubscription) to perform automatic groups assignment and returns newsletter subscription status. If some action fails - exception is thrown.
string | $sUser user login name | |
string | $sPassword user password | |
string | $sPassword2 user confirmation password | |
array | $aInvAddress user billing address | |
array | $aDelAddress delivery address |
oxUserException,oxInputException,oxConnectionException |
Definition at line 1058 of file oxuser.php.
oxUser.checkIfEmailExists | ( | $ | sEmail | ) |
Checks for already used email
string | $sEmail user email/login |
Definition at line 1633 of file oxuser.php.
oxUser.checkPassword | ( | $ | sNewPass, | |
$ | sConfPass, | |||
$ | blCheckLenght = false | |||
) |
Checking if user password is fine. In case of error exception is thrown
string | $sNewPass new user password | |
string | $sConfPass retyped user password | |
bool | $blCheckLenght option to check password lenght |
oxUserException,oxInputException |
Definition at line 1789 of file oxuser.php.
oxUser.checkValues | ( | $ | sLogin, | |
$ | sPassword, | |||
$ | sPassword2, | |||
$ | aInvAddress, | |||
$ | aDelAddress | |||
) |
Performs bunch of checks if user profile data is correct; on any error exception is thrown
string | $sLogin user login name | |
string | $sPassword user password | |
string | $sPassword2 user password to compare | |
array | $aInvAddress array of user profile data | |
array | $aDelAddress array of user profile data |
oxUserException,oxInputException |
Definition at line 977 of file oxuser.php.
oxUser.convertBirthday | ( | $ | aData | ) |
User birthday converter. Usually this data comes in array form, so before writing into DB it must be converted into string
array | $aData dirthday data |
Definition at line 868 of file oxuser.php.
oxUser.createUser | ( | ) |
Inserts new or updates existing user
oxUserException | exception |
Definition at line 710 of file oxuser.php.
oxUser.decodeSalt | ( | $ | sSaltHex | ) |
Returns plains password salt representation
string | $sSaltHex heximal representation of password salt value |
Definition at line 2185 of file oxuser.php.
oxUser.delete | ( | $ | sOXID = null |
) |
Removes user data stored in some DB tables (such as oxuserpayments, oxaddress oxobject2group, oxremark, etc). Return true on success.
string | $sOXID object ID (default null) |
Reimplemented from oxBase.
Definition at line 493 of file oxuser.php.
oxUser.encodePassword | ( | $ | sPassword, | |
$ | sSalt | |||
) |
Encodes and returns given password
string | $sPassword password to encode | |
string | $sSalt any unique string value |
Definition at line 2160 of file oxuser.php.
oxUser.exists | ( | $ | sOXID = null |
) |
Checks if user exists in database.
string | $sOXID object ID (default null) |
Reimplemented from oxBase.
Definition at line 563 of file oxuser.php.
oxUser.getActiveCountry | ( | ) |
Returns user country ID, but If delivery address is given - returns delivery country.
Definition at line 684 of file oxuser.php.
static oxUser.getActiveUser | ( | $ | blForceAdmin = false |
) | [static] |
Loads active user object. If user is not available - returns false.
bool | $blForceAdmin (default false) |
Definition at line 2276 of file oxuser.php.
static oxUser.getAdminUser | ( | ) | [static] |
Loads active admin user object (if possible). If user is not available - returns false.
Definition at line 2261 of file oxuser.php.
oxUser.getBasket | ( | $ | sName | ) |
Returns notice, wishlist or saved basket object
string | $sName name/type of basket |
Definition at line 839 of file oxuser.php.
oxUser.getBoni | ( | ) |
No logic set, only returns "1000". You should extend this function according your needs.
Definition at line 918 of file oxuser.php.
oxUser.getNewsSubscription | ( | ) |
Returns user newsletter subscription controller object
Definition at line 189 of file oxuser.php.
oxUser.getNoticeListArtCnt | ( | ) |
oxUser.getOpenIdPassword | ( | $ | iLength = 25 |
) |
Generates random password for new openid users
integer | $iLength random password length |
Definition at line 2293 of file oxuser.php.
oxUser.getOrderCount | ( | ) |
oxUser.getOrders | ( | $ | iLimit = false , |
|
$ | iPage = 0 | |||
) |
Returns object with ordering information (order articles list).
int | $iLimit how many entries to load | |
int | $iPage which page to start |
Definition at line 600 of file oxuser.php.
oxUser.getPasswordHash | ( | ) |
Returns password hash. In case password in db is plain or decodable password is processed and hash returned
Definition at line 2237 of file oxuser.php.
oxUser.getRecommListsCount | ( | $ | sOx = null |
) |
Returns recommlist count
string | $sOx object ID (default is null) |
Definition at line 1717 of file oxuser.php.
oxUser.getReviewUserHash | ( | $ | sUserId | ) |
Generates user password and username hash for review
string | $sUserId userid |
Definition at line 2306 of file oxuser.php.
oxUser.getReviewUserId | ( | $ | sReviewUserHash | ) |
Gets from review user hash user id
string | $sReviewUserHash review user hash |
Definition at line 2320 of file oxuser.php.
oxUser.getSelectedAddress | ( | $ | sWishId = false |
) |
Sets in the array oxuser._aAddresses selected address. Returns user selected Address id.
bool | $sWishId wishlist user id |
Definition at line 348 of file oxuser.php.
oxUser.getSelectedAddressId | ( | ) |
Returns user chosen address id ("oxaddressid" or "deladrid")
Definition at line 327 of file oxuser.php.
oxUser.getState | ( | ) |
Returns string representation of user state
Definition at line 2332 of file oxuser.php.
oxUser.getUpdateId | ( | ) |
oxUser.getUpdateLinkTerm | ( | ) |
Return password update link validity term (seconds). Default 3600 * 6
Definition at line 2119 of file oxuser.php.
oxUser.getUserAddresses | ( | $ | sUserId = null |
) |
Returns user defined Address list object
string | $sUserId object ID (default is null) |
Definition at line 285 of file oxuser.php.
oxUser.getUserCountry | ( | $ | sCountryId = null , |
|
$ | iLang = null | |||
) |
Returns user country (object) according to passed parameters or they are taken from user object ( oxid, country id) and session (language)
string | $sCountryId country id (optional) | |
int | $iLang active language (optional) |
Definition at line 222 of file oxuser.php.
oxUser.getUserCountryId | ( | $ | sCountry = null |
) |
Returns user countryid according to passed name
string | $sCountry country |
Definition at line 242 of file oxuser.php.
oxUser.getUserGroups | ( | $ | sOXID = null |
) |
Returns assigned user groups list object
string | $sOXID object ID (default is null) |
Definition at line 258 of file oxuser.php.
oxUser.getUserPayments | ( | $ | sOXID = null |
) |
Returns user payment history list object
string | $sOXID object ID (default is null) |
Definition at line 388 of file oxuser.php.
oxUser.getUserRecommLists | ( | $ | sOXID = null |
) |
Returns user recommendation list object
string | $sOXID object ID (default is null) |
Definition at line 1686 of file oxuser.php.
oxUser.getWishListArtCnt | ( | ) |
oxUser.inGroup | ( | $ | sGroupID | ) |
Checks if this object is in group, returns true on success.
string | $sGroupID user group ID |
Definition at line 475 of file oxuser.php.
oxUser.isExpiredUpdateId | ( | $ | sKey | ) |
Checks if password update key is not expired yet
string | $sKey key |
Definition at line 2131 of file oxuser.php.
oxUser.isLoadedFromCookie | ( | ) |
oxUser.isSamePassword | ( | $ | sNewPass | ) |
Checks if user entered password is the same as old
string | $sNewPass new password |
Definition at line 2216 of file oxuser.php.
oxUser.isTermsAccepted | ( | ) |
Checks if user accepted latest shopping terms and conditions version
Definition at line 2342 of file oxuser.php.
oxUser.load | ( | $ | oxID | ) |
Loads object (user) details from DB. Returns true on success.
string | $oxID User ID |
Reimplemented from oxBase.
Definition at line 543 of file oxuser.php.
oxUser.loadActiveUser | ( | $ | blForceAdmin = false |
) |
Loads active user object. If user is not available - returns false.
bool | $blForceAdmin (default false) |
Definition at line 1318 of file oxuser.php.
oxUser.loadAdminUser | ( | ) |
Loads active admin user object (if possible). If user is not available - returns false.
Definition at line 1305 of file oxuser.php.
oxUser.loadUserByUpdateId | ( | $ | sUid | ) |
Tries to load user object by passed update id. Update id is generated when user forgot passwords and wants to update it
string | $sUid update id |
Definition at line 2083 of file oxuser.php.
oxUser.login | ( | $ | sUser, | |
$ | sPassword, | |||
$ | blCookie = false | |||
) |
Performs user login by username and password. Fetches user data from DB. Registers in session. Returns true on success, FALSE otherwise.
string | $sUser User username | |
string | $sPassword User password | |
bool | $blCookie (default false) |
oxConnectionException,oxCookieException,oxUserException |
Definition at line 1157 of file oxuser.php.
oxUser.logout | ( | ) |
Logs out session user. Returns true on success
Definition at line 1280 of file oxuser.php.
oxUser.onOrderExecute | ( | $ | oBasket, | |
$ | iSuccess | |||
) |
Called after saving an order.
object | $oBasket Shopping basket object | |
int | $iSuccess order success status |
Definition at line 802 of file oxuser.php.
oxUser.openIdLogin | ( | $ | sUser | ) |
Performs user login by username and password. Fetches user data from DB. Registers in session. Returns true on success, FALSE otherwise.
string | $sUser User username |
oxConnectionException,oxUserException |
Definition at line 1239 of file oxuser.php.
oxUser.prepareSalt | ( | $ | sSalt | ) |
Returns safe salt value (heximal representation)
string | $sSalt any unique string value |
Definition at line 2173 of file oxuser.php.
oxUser.removeFromGroup | ( | $ | sGroupID = null |
) |
Removes user from passed user group.
string | $sGroupID group id |
Definition at line 779 of file oxuser.php.
oxUser.save | ( | ) |
Saves (updates) user object data information in DB. Return true on success.
Reimplemented from oxBase.
Definition at line 417 of file oxuser.php.
oxUser.setCreditPointsForInviter | ( | ) |
oxUser.setCreditPointsForRegistrant | ( | $ | sUserId | ) |
Assigns registration points for invited user and its inviter (calls oxUser.setInvitationCreditPoints())
string | $sUserId inviter user id |
Definition at line 2371 of file oxuser.php.
oxUser.setMallUsersStatus | ( | $ | blOn = false |
) |
Sets mall user status
bool | $blOn mall users is on or off |
Definition at line 138 of file oxuser.php.
oxUser.setNewsSubscription | ( | $ | blSubscribe, | |
$ | blSendOptIn | |||
) |
Sets newsletter subscription status to user
bool | $blSubscribe subscribes/unsubscribes user from newsletter | |
bool | $blSendOptIn if to send confirmation email |
Definition at line 1006 of file oxuser.php.
oxUser.setPassword | ( | $ | sPassword = null |
) |
Sets new password for user ( save is not called)
string | $sPassword password |
Definition at line 2197 of file oxuser.php.
oxUser.setSelectedAddressId | ( | $ | sAddressId | ) |
Selected user address setter
string | $sAddressId selected address id |
Definition at line 317 of file oxuser.php.
oxUser.setUpdateKey | ( | $ | blReset = false |
) |
Generates or resets and saves users update key
bool | $blReset marker to reset update info |
Definition at line 2099 of file oxuser.php.
oxUser.updateFbId | ( | ) |
oxUser.$_aAddresses = array() [protected] |
Definition at line 53 of file oxuser.php.
oxUser.$_aBaskets = array() [protected] |
Definition at line 39 of file oxuser.php.
oxUser.$_aUserCookie = array() [static, protected] |
Definition at line 81 of file oxuser.php.
oxUser.$_blDisableShopCheck = true [protected] |
Definition at line 14 of file oxuser.php.
oxUser.$_blLoadedFromCookie = null [protected] |
Definition at line 116 of file oxuser.php.
oxUser.$_blMallUsers = false [protected] |
Definition at line 74 of file oxuser.php.
oxUser.$_iCntNoticeListArticles = null [protected] |
Definition at line 88 of file oxuser.php.
oxUser.$_iCntRecommLists = null [protected] |
Definition at line 102 of file oxuser.php.
oxUser.$_iCntWishListArticles = null [protected] |
Definition at line 95 of file oxuser.php.
oxUser.$_oGroups [protected] |
Definition at line 46 of file oxuser.php.
oxUser.$_oNewsSubscription = null [protected] |
Definition at line 20 of file oxuser.php.
oxUser.$_oPayments [protected] |
Definition at line 60 of file oxuser.php.
oxUser.$_oRecommList [protected] |
Definition at line 67 of file oxuser.php.
oxUser.$_sClassName = 'oxuser' [protected] |
Reimplemented from oxBase.
Definition at line 32 of file oxuser.php.
oxUser.$_sCoreTbl = 'oxuser' [protected] |
Definition at line 26 of file oxuser.php.
oxUser.$_sUpdateKey = null [protected] |
Definition at line 109 of file oxuser.php.