Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezdefaultshopaccounthandler.php
Go to the documentation of this file.
1 <?php
11 class eZDefaultShopAccountHandler
12 {
17 function verifyAccountInformation()
18 {
19 return eZUser::isCurrentUserRegistered();
20 }
21
25 function email( $order = false )
26 {
27 if ( $order === false )
28 $user = eZUser::currentUser();
29 else
30 $user = $order->attribute( 'user' );
31
32 if ( is_object( $user ) )
33 return $user->attribute( 'email' );
34 else
35 return null;
36 }
37
41 function accountName( $order = false )
42 {
43 if ( $order === false )
44 $user = eZUser::currentUser();
45 else
46 $user = $order->attribute( 'user' );
47
48 if ( is_object( $user ) )
49 {
50 $userObject = $user->attribute( 'contentobject' );
51 $accountName = $userObject->attribute( 'name' );
52 }
53 else
54 $accountName = null;
55 return $accountName;
56 }
57
58 function fetchAccountInformation( &$module )
59 {
60 $http = eZHTTPTool::instance();
61 $http->setSessionVariable( 'RedirectAfterLogin', '/shop/basket/' );
62 $http->setSessionVariable( 'DoCheckoutAutomatically', true );
63 $module->redirectTo( '/user/login/' );
64 }
65
66 function accountInformation( $order )
67 {
68 $user = $order->user();
69 $userObject = $user->attribute( "contentobject" );
70 $dataMap = $userObject->dataMap();
71
72 return array( 'first_name' => $dataMap['first_name']->content(),
73 'last_name' => $dataMap['last_name']->content(),
74 'email' => $user->attribute( "email" ) );
75 }
76 }
77
78 ?>
eZDefaultShopAccountHandler
Definition: ezdefaultshopaccounthandler.php:12
eZDefaultShopAccountHandler\accountInformation
accountInformation( $order)
Definition: ezdefaultshopaccounthandler.php:66
eZDefaultShopAccountHandler\fetchAccountInformation
fetchAccountInformation(&$module)
Definition: ezdefaultshopaccounthandler.php:58
eZDefaultShopAccountHandler\accountName
accountName( $order=false)
Definition: ezdefaultshopaccounthandler.php:41
eZDefaultShopAccountHandler\email
email( $order=false)
Definition: ezdefaultshopaccounthandler.php:25
eZDefaultShopAccountHandler\verifyAccountInformation
verifyAccountInformation()
Definition: ezdefaultshopaccounthandler.php:17
eZHTTPTool\instance
static instance()
Definition: ezhttptool.php:189
eZUser\currentUser
static currentUser()
Definition: ezuser.php:1716
eZUser\isCurrentUserRegistered
static isCurrentUserRegistered()
Definition: ezuser.php:2558
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.