FORUM IS CLOSED. PLEASE USE QUESTIONS / ANSWERS PAGE INSTEAD
Login  |  Forum  |  Search   

Board index » Development » Help requests




Post new topic Reply to topic  [ 5 posts ] 
 
Author Message
 Post subject: Autologin after registration without email verification
 Post Posted: Wed Oct 24, 2012 5:54 am 
Offline

Joined: Tue Jul 03, 2012 6:47 am
Posts: 7
It can automatically log visitor if I don't use the function to validate an email address?

You need to modify the code in controller.php? I use version 2.4.


Top 
 Profile  
 
 Post subject: Re: Autologin after registration without email verification
 Post Posted: Fri Oct 26, 2012 9:15 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
It is not good to change core files as your changes will be lost after update. I'm working on documentation page about vent which is going to cover the right way of doing that. Will post here when finished.


Top 
 Profile  
 
 Post subject: Re: Autologin after registration without email verification
 Post Posted: Sat Oct 27, 2012 11:12 am 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
Here is a topic about system ImpressPages 2.x event system: http://www.impresspages.org/docs2/core2/events/

Unfortunately users module is still using 1.x way of doing. So instead of following above manual, create plugin and put following content into plugin system.php file:

Code:
<?php

namespace Modules\modulegroup\modulename;


class System{

    public function catchEvent($moduleGroup, $moduleName, $event, $parameters) {
        global $session;

        if ($moduleGroup == 'community' && $moduleName == 'user' && $event == 'register' ) {
            $session->login($parameters['user_id']);
        }

    }
}


Top 
 Profile  
 
 Post subject: Re: Autologin after registration without email verification
 Post Posted: Wed Nov 14, 2012 1:32 pm 
Offline

Joined: Tue Jul 03, 2012 6:47 am
Posts: 7
I have a problem using the function for automatic login after registration.
It appears that this script is not working, what can be the problem?

Code:
                if ($parametersMod->getValue('community', 'user', 'options', 'autologin_after_registration')) {
                    $tmpUser = Db::userById($insertId);
                    if ($tmpUser) {
                        $this->login($tmpUser);
                        $redirectUrl = $this->redirectAfterLoginUrl();
                        $data = array (
                            'status' => 'success',
                            'redirectUrl' => $redirectUrl
                        );
                        $this->returnJson($data);
                        return;
                    }
                }

ip_cms\modules\community\user\controller.php


Top 
 Profile  
 
 Post subject: Re: Autologin after registration without email verification
 Post Posted: Wed Nov 14, 2012 9:14 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
I have created an issue for that: https://github.com/impresspages/Impress ... issues/200


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 5 posts ] 

Board index » Development » Help requests


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron