83 $this->_aRegParams = $aParams;
85 if ( !$aParams[
'oxuser__oxusername'] ) {
86 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'ERROR_MESSAGE_COMPLETE_FIELDS_CORRECTLY');
90 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'MESSAGE_INVALID_EMAIL');
96 $oUser =
oxNew(
'oxuser' );
99 $blUserLoaded =
false;
102 if ( !$oUser->exists() ) {
105 if ( !$blSubscribe ) {
107 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'NEWSLETTER_EMAIL_NOT_EXIST');
118 $blUserLoaded = $oUser->save();
122 $blUserLoaded = $oUser->load( $oUser->getId() );
128 if ( $blSubscribe && $blUserLoaded ) {
130 $oUser->setNewsSubscription(
false,
false );
132 $blOrderOptInEmail = $this->
getConfig()->getConfigParam(
'blOrderOptInEmail' );
133 if ( $oUser->setNewsSubscription(
true, $blOrderOptInEmail ) ) {
135 if ( $blOrderOptInEmail ) {
136 $this->_iNewsletterStatus = 1;
138 $this->_iNewsletterStatus = 2;
141 oxRegistry::get(
"oxUtilsView")->addErrorToDisplay(
'MESSAGE_NOT_ABLE_TO_SEND_EMAIL');
143 } elseif ( !$blSubscribe && $blUserLoaded ) {
145 $oUser->setNewsSubscription(
false,
false );
146 $this->_iNewsletterStatus = 3;
161 $oUser =
oxNew(
'oxuser' );
163 $sConfirmCode = md5($oUser->oxuser__oxusername->value.$oUser->oxuser__oxpasssalt->value);
166 $oUser->getNewsSubscription()->setOptInStatus( 1 );
167 $oUser->addToGroup(
'oxidnewsletter' );
168 $this->_iNewsletterStatus = 2;
181 $oUser =
oxNew(
'oxuser' );
183 $oUser->getNewsSubscription()->setOptInStatus( 0 );
186 $oUser->removeFromGroup(
'oxidnewsletter' );
188 $this->_iNewsletterStatus = 3;
209 if ( $this->_oActionArticles === null ) {
210 $this->_oActionArticles =
false;
211 if ( $this->
getConfig()->getConfigParam(
'bl_perfLoadAktion' ) ) {
212 $oArtList =
oxNew(
'oxarticlelist' );
213 $oArtList->loadActionArticles(
'OXTOPSTART' );
214 if ( $oArtList->count() ) {
215 $this->_oTopArticle = $oArtList->current();
216 $this->_oActionArticles = $oArtList;
230 if ( $this->_oTopArticle === null ) {
231 $this->_oTopArticle =
false;
246 if ( $this->_sHomeCountryId === null ) {
247 $this->_sHomeCountryId =
false;
248 $aHomeCountry = $this->
getConfig()->getConfigParam(
'aHomeCountry' );
249 if ( is_array( $aHomeCountry ) ) {
250 $this->_sHomeCountryId = current( $aHomeCountry );
286 $aPath[
'link'] = $this->
getLink();