OXID eShop CE  4.9.7
 All Classes Files Functions Variables Pages
oxcmp_user Class Reference
+ Inheritance diagram for oxcmp_user:
+ Collaboration diagram for oxcmp_user:

Public Member Functions

 init ()
 render ()
 login ()
 login_noredirect ()
 login_updateFbId ()
 logout ()
 changeUser ()
 changeuser_testvalues ()
 createUser ()
 registerUser ()
 setLoginStatus ($iStatus)
 getLoginStatus ()
 getInvitor ()
 setRecipient ()
- Public Member Functions inherited from oxView
 setViewParameters ($aParams=null)
 getViewParameter ($sKey)
 setIsCallForCache ($blIsCallForCache=null)
 getIsCallForCache ()
 getViewId ()
 addGlobalParams ($oShop=null)
 addTplParam ($sPara, $sValue)
 getBelboonParam ()
 getViewConfig ()
 getTemplateName ()
 setTemplateName ($sTemplate)
 setClassName ($sClassName)
 getClassName ()
 setFncName ($sFncName)
 getFncName ()
 setViewData ($aViewData=null)
 getViewData ()
 getViewDataElement ($sParamId=null)
 setClassLocation ($sClassLocation=null)
 getClassLocation ()
 setThisAction ($sThisAction=null)
 getThisAction ()
 setParent ($oParent=null)
 getParent ()
 setIsComponent ($blIsComponent=null)
 getIsComponent ()
 executeFunction ($sFunction)
 getAdditionalParams ()
 getTrustedShopId ()
 getTSExcellenceId ()
 getCharSet ()
 getShopVersion ()
 getShopEdition ()
 getRevision ()
 getPackageInfo ()
 getShopFullEdition ()
 isDemoVersion ()
 isBetaVersion ()
 isRCVersion ()
 showBetaNote ()
 isDemoShop ()
 showNewsletter ()
 setShowNewsletter ($blShow)
 getShopLogo ()
 setShopLogo ($sLogo)
 getActCategory ()
 setActCategory ($oCategory)
 getCategoryId ()
 setCategoryId ($sCategoryId)
 getErrorDestination ()
 getActionClassName ()
 isConnectedWithFb ()
 getFbUserId ()
 showFbConnectToAccountMsg ()
 isMall ()
 showRdfa ()
 getSidForWidget ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _checkPsState ()
 _loadSessionUser ()
 _afterLogin ($oUser)
 _afterLogout ()
 _saveInvitor ()
 _saveDeliveryAddressState ()
 _changeUser_noRedirect ()
 _getDelAddressData ()
 _getLogoutLink ()
- Protected Member Functions inherited from oxView
 _executeNewAction ($sNewAction)

Protected Attributes

 $_blIsNewUser = false
 $_blIsComponent = true
 $_blNewsSubscriptionStatus = null
 $_iLoginStatus = null
 $_sTermsVer = null
- Protected Attributes inherited from oxView
 $_aViewData = array()
 $_sClassLocation = null
 $_sThisAction = null
 $_oParent = null
 $_blIsComponent = false
 $_sThisTemplate = null
 $_sViewId = null
 $_sClass = null
 $_sFnc = null
 $_sTrustedShopId = null
 $_sTSExcellenceId = null
 $_sCharSet = null
 $_sVersion = null
 $_blDemoVersion = null
 $_blDemoShop = null
 $_iNewsStatus = null
 $_sShopLogo = null
 $_sCategoryId = null
 $_oClickCat = null
 $_blIsCallForCache = false
 $_oViewConf = null

Additional Inherited Members

- Static Protected Attributes inherited from oxView
static $_blExecuted = false

Detailed Description

User object manager. Sets user details data, switches, logouts, logins user etc.


Definition at line 14 of file oxcmp_user.php.

Member Function Documentation

oxcmp_user::_afterLogin (   $oUser)

Special functionality which is performed after user logs in (or user is created without pass). Performes additional checking if user is not BLOCKED (oxuser::InGroup("oxidblocked")) - if yes - redirects to blocked user page ("cl=content&tpl=user_blocked.tpl"). Stores cookie info if user confirmed in login screen. Then loads delivery info and forces basket to recalculate (oxsession::getBasket() + oBasket::blCalcNeeded = true). Returns "payment" to redirect to payment screen. If problems occured loading user - sets error code according problem, and returns "user" to redirect to user info screen.

oxuser$oUseruser object

Definition at line 217 of file oxcmp_user.php.

oxcmp_user::_afterLogout ( )

Special utility function which is executed right after oxcmp_user::logout is called. Currently it unsets such session parameters as user chosen payment id, delivery address id, active delivery set.

Definition at line 295 of file oxcmp_user.php.

oxcmp_user::_changeUser_noRedirect ( )

Mostly used for customer profile editing screen (OXID eShop -> MY ACCOUNT). Checks if oUser is set (oxcmp_user::oUser) - if not - executes oxcmp_user::_loadSessionUser(). If user unchecked newsletter subscription option - removes him from this group. There is an additional MUST FILL fields checking. Function returns true or false according to user data submission status.

Session variables: ordrem

bool true on success, false otherwise

Definition at line 581 of file oxcmp_user.php.

oxcmp_user::_checkPsState ( )

If private sales enabled, checks: (1) if no session user and view can be accessed; (2) session user is available and accepted terms version matches actual version. In case any condition is not satisfied redirects user to: (1) login page; (2) terms agreement page;

Definition at line 109 of file oxcmp_user.php.

oxcmp_user::_getDelAddressData ( )

Returns delivery address from request. Before returning array is checked if all needed data is there


Definition at line 655 of file oxcmp_user.php.

oxcmp_user::_getLogoutLink ( )

Returns logout link with additional params

string $sLogoutLink

Definition at line 683 of file oxcmp_user.php.

oxcmp_user::_loadSessionUser ( )

Tries to load user ID from session.


Definition at line 133 of file oxcmp_user.php.

oxcmp_user::_saveDeliveryAddressState ( )

Saving show/hide delivery address state

Definition at line 556 of file oxcmp_user.php.

oxcmp_user::_saveInvitor ( )

Saves invitor ID

Definition at line 545 of file oxcmp_user.php.

oxcmp_user::changeUser ( )

Executes blUserRegistered = oxcmp_user::_changeUser_noRedirect(). if this returns true - returns "payment" (this redirects to payment page), else returns blUserRegistered value.

See Also
mixed redirection string or true if user is registered, false otherwise

Definition at line 350 of file oxcmp_user.php.

oxcmp_user::changeuser_testvalues ( )

Executes oxcmp_user::_changeuser_noredirect(). returns "account_user" (this redirects to billing and shipping settings page) on success


Definition at line 367 of file oxcmp_user.php.

oxcmp_user::createUser ( )

First test if all MUST FILL fields were filled, then performed additional checking oxcmp_user::CheckValues(). If no errors occured - trying to create new user (oxuser::CreateUser()), logging him to shop (oxuser::Login() if user has entered password). If oxuser::CreateUser() returns false - this means user is allready created - we only logging him to shop (oxcmp_user::Login()). If there is any error with missing data - function will return false and set error code (oxcmp_user::iError). If user was created successfully - will return "payment" to redirect to payment interface.

Template variables: usr_err

Session variables: usr_err, usr

mixed redirection string or true if successful, false otherwise

Definition at line 398 of file oxcmp_user.php.

oxcmp_user::getInvitor ( )

Sets invitor id to session from URL

Definition at line 737 of file oxcmp_user.php.

oxcmp_user::getLoginStatus ( )

Returns user login state marker:

  • USER_LOGIN_SUCCESS - user successfully logged in;
  • USER_LOGIN_FAIL - login failed;
  • USER_LOGOUT - user logged out.

Definition at line 729 of file oxcmp_user.php.

oxcmp_user::init ( )

Sets oxcmp_oxuser::blIsComponent = true, fetches user error code and sets it to default - 0. Executes parent::init().

Session variable: usr_err

Reimplemented from oxView.

Definition at line 76 of file oxcmp_user.php.

oxcmp_user::login ( )

Collects posted user information from posted variables ("lgn_usr", "lgn_pwd", "lgn_cook"), executes oxuser::login() and checks if such user exists.

Session variables: usr, usr_err

Template variables: usr_err

string redirection string

Definition at line 172 of file oxcmp_user.php.

oxcmp_user::login_noredirect ( )

Executes oxcmp_user::login() method. After loggin user will not be redirected to user or payment screens.

Definition at line 247 of file oxcmp_user.php.

oxcmp_user::login_updateFbId ( )

Executes oxcmp_user::login() and updates logged in user Facebook User ID (if user was connected using Facebook Connect)

Definition at line 277 of file oxcmp_user.php.

oxcmp_user::logout ( )

Deletes user information from session:
"usr", "dynvalue", "paymentid"
also deletes cookie, unsets oxconfig::oUser, oxcmp_user::oUser, forces basket to recalculate.


Definition at line 317 of file oxcmp_user.php.

oxcmp_user::registerUser ( )

Creates new oxid user

string partial parameter string or null

Definition at line 527 of file oxcmp_user.php.

oxcmp_user::render ( )

Executes parent::render(), oxcmp_user::_loadSessionUser(), loads user delivery info. Returns user object oxcmp_user::oUser.

object user object

Reimplemented from oxView.

Definition at line 91 of file oxcmp_user.php.

oxcmp_user::setLoginStatus (   $iStatus)

Sets user login state


Definition at line 716 of file oxcmp_user.php.

oxcmp_user::setRecipient ( )

sets from URL invitor id

Definition at line 749 of file oxcmp_user.php.

Member Data Documentation

Initial value:

Definition at line 60 of file oxcmp_user.php.

oxcmp_user::$_blIsComponent = true

Definition at line 29 of file oxcmp_user.php.

oxcmp_user::$_blIsNewUser = false

Definition at line 22 of file oxcmp_user.php.

oxcmp_user::$_blNewsSubscriptionStatus = null

Definition at line 36 of file oxcmp_user.php.

oxcmp_user::$_iLoginStatus = null

Definition at line 46 of file oxcmp_user.php.

oxcmp_user::$_sTermsVer = null

Definition at line 53 of file oxcmp_user.php.

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