OXID eShop CE
4.8.11
Main Page
Related Pages
Classes
Files
File List
File Members
OXID eShop CE
Deprecated List
Classes
Files
File List
admin
application
components
controllers
admin
account.php
account_downloads.php
account_newsletter.php
account_noticelist.php
account_order.php
account_password.php
account_recommlist.php
account_user.php
account_wishlist.php
alist.php
basket.php
clearcookies.php
compare.php
contact.php
content.php
credits.php
details.php
download.php
exceptionerror.php
forgotpwd.php
guestbook.php
guestbookentry.php
invite.php
links.php
manufacturerlist.php
moredetails.php
news.php
newsletter.php
order.php
oxubase.php
payment.php
pricealarm.php
recommadd.php
recommlist.php
register.php
review.php
rss.php
search.php
start.php
suggest.php
tag.php
tags.php
thankyou.php
tpl.php
user.php
vendorlist.php
wishlist.php
wrapping.php
models
translations
bin
core
modules
index.php
bootstrap.php
config.inc.php
getimg.php
oxseo.php
widget.php
File Members
•
All
Classes
Files
Functions
Variables
Pages
register.php
Go to the documentation of this file.
1
<?php
2
7
class
Register
extends
User
8
{
14
protected
$_sThisTemplate
=
'page/account/register.tpl'
;
15
21
protected
$_sSuccessTemplate
=
'page/account/register_success.tpl'
;
22
28
protected
$_sConfirmTemplate
=
'page/account/register_confirm.tpl'
;
29
34
protected
$_blIsOrderStep
=
false
;
35
41
protected
$_iViewIndexState
=
VIEW_INDEXSTATE_NOINDEXNOFOLLOW
;
42
49
public
function
render
()
50
{
51
parent::render
();
52
53
// checking registration status
54
if
( $this->
isEnabledPrivateSales
() && $this->
isConfirmed
() ) {
55
$sTemplate =
$this->_sConfirmTemplate
;
56
} elseif ( $this->
getRegistrationStatus
() ) {
57
$sTemplate =
$this->_sSuccessTemplate
;
58
}
else
{
59
$sTemplate =
$this->_sThisTemplate
;
60
}
61
62
return
$sTemplate;
63
}
64
70
public
function
getRegistrationError
()
71
{
72
return
oxConfig::getParameter
(
'newslettererror'
);
73
}
74
80
public
function
getRegistrationStatus
()
81
{
82
return
oxConfig::getParameter
(
'success'
);
83
}
84
92
public
function
isFieldRequired
( $sField )
93
{
94
if
( $aMustFillFields = $this->
getMustFillFields
() ) {
95
if
( isset( $aMustFillFields[$sField] ) ) {
96
return
true
;
97
}
98
}
99
100
return
false
;
101
}
102
110
public
function
confirmRegistration
()
111
{
112
$oUser =
oxNew
(
'oxuser'
);
113
if
( $oUser->loadUserByUpdateId( $this->getUpdateId() ) ) {
114
115
// resetting update key parameter
116
$oUser->setUpdateKey(
true
);
117
118
// saving ..
119
$oUser->oxuser__oxactive =
new
oxField
( 1 );
120
$oUser->save();
121
122
// forcing user login
123
oxSession::setVar
(
'usr'
, $oUser->getId() );
124
125
// redirecting to confirmation page
126
return
'register?confirmstate=1'
;
127
}
else
{
128
// confirmation failed
129
oxRegistry::get
(
"oxUtilsView"
)->addErrorToDisplay(
'REGISTER_ERRLINKEXPIRED'
,
false
,
true
);
130
131
// redirecting to confirmation page
132
return
'account'
;
133
}
134
}
135
141
public
function
getUpdateId
()
142
{
143
return
oxConfig::getParameter
(
'uid'
);
144
}
145
151
public
function
isConfirmed
()
152
{
153
return
(
bool
)
oxConfig::getParameter
(
"confirmstate"
);
154
}
155
161
public
function
getBreadCrumb
()
162
{
163
$aPaths = array();
164
$aPath = array();
165
166
$aPath[
'title'
] =
oxRegistry::getLang
()->translateString(
'REGISTER'
,
oxRegistry::getLang
()->getBaseLanguage(),
false
);
167
$aPath[
'link'
] = $this->
getLink
();
168
$aPaths[] = $aPath;
169
170
return
$aPaths;
171
}
172
173
174
}
application
controllers
register.php
Generated by
1.8.1.2