AnilaN Posted September 30, 2011 Share Posted September 30, 2011 Hi, I added a radio button with options 'company' and 'individual' on authentication page and when the user clicks on create account he sees a different registration form according to his choice. Now what I want to do is if user is a company: - activate the account manually To do so i changed in authController $customer->active = 1; to $customer->active = 0; But the prob is that after this when the user clicks on register he is redirected to authentication.php while I want to redirect him to a page which asks him to send his company registration info to us (via mail or fax). And his account will be activated (manually) after verification of the received info. Any ideas how to do this? Thanks in advance Link to comment Share on other sites More sharing options...
AnilaN Posted September 30, 2011 Author Share Posted September 30, 2011 Solved the problem by myself. Link to comment Share on other sites More sharing options...
Garnisoft Posted November 9, 2011 Share Posted November 9, 2011 Hi aany can you share the solution, i want to do the same, can you help ? regards Link to comment Share on other sites More sharing options...
EQ10000 Posted January 26, 2012 Share Posted January 26, 2012 Well, I got the same problem, and submitted a post here... and looking for solution. Anyone, please help. Link to comment Share on other sites More sharing options...
EQ10000 Posted January 26, 2012 Share Posted January 26, 2012 Log data in classes/Tools.php public static function redirect($url, $baseUri = __PS_BASE_URI__) { if (strpos($url, 'http://') === FALSE && strpos($url, 'https://') === FALSE) { global $link; if (strpos($url, $baseUri) !== FALSE && strpos($url, $baseUri) == 0) $url = substr($url, strlen($baseUri)); $explode = explode('?', $url, 2); // don't use ssl if url is home page // used when logout for example $useSSL = !empty($url); $url = $link->getPageLink($explode[0], $useSSL); if (isset($explode[1])) $url .= '?'.$explode[1]; $baseUri = ''; Db::getInstance()->Execute("UPDATE "._DB_PREFIX_."test SET test = 'url:".$url."' WHERE id_test = 1"); } Db::getInstance()->Execute("UPDATE "._DB_PREFIX_."test SET test = 'url:".$url."' WHERE id_test = 2"); if (isset($_SERVER['HTTP_REFERER']) AND ($url == $_SERVER['HTTP_REFERER'])) { header('Location: '.$_SERVER['HTTP_REFERER']); } else { header('Location: '.$baseUri.$url); } exit; If I set $customer->active = 0; Then, id 1 url:http://ps1451.smetea.com/new-user-confirmation.php id 2 url:http://ps1451.smetea.com/authentication.php In id2, url changed,??? If I set $customer->active = 1; Then, id 1 url:http://ps1451.smetea.com/new-user-confirmation.php id 2 url:http://ps1451.smetea.com/new-user-confirmation.php In id2, url unchanged. Anyone can help, please... Link to comment Share on other sites More sharing options...
EQ10000 Posted January 27, 2012 Share Posted January 27, 2012 Ok, problem solved in this forum thead. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now