Merge commit 'origin/fusionax' into account
[platal.git] / modules / register.php
index 5b098f0..2654fd0 100644 (file)
@@ -419,6 +419,7 @@ class RegisterModule extends PLModule
     {
         global $globals;
         $page->changeTpl('register/success.tpl');
+        $page->assign('user', S::user());
 
         $_SESSION['sub_state'] = array('step' => 5);
         if (Env::has('response2'))  {
@@ -439,13 +440,8 @@ class RegisterModule extends PLModule
                 }
             }
 
-            $log = S::v('log');
-            S::logger()->log('passwd', '');
-
-            if (Cookie::v('ORGaccess')) {
-                require_once('secure_hash.inc.php');
-                setcookie('ORGaccess', hash_encrypt($password), (time()+25920000), '/', '' ,0);
-            }
+            S::logger()->log('passwd');
+            Platal::session()->setAccessCookie(true);
 
             $page->assign('mdpok', true);
         }