Merge branch 'master' into hruid
[platal.git] / modules / register.php
index 04f4ffc..c0a7cce 100644 (file)
@@ -83,8 +83,8 @@ class RegisterModule extends PLModule
 
         switch ($sub_state['step']) {
             case 0:
-                require_once('wiki.inc.php');
-                wiki_require_page('Reference.Charte');
+                $wp = new PlWikiPage('Reference.Charte');
+                $wp->buildCache();
                 if (Post::has('step1')) {
                     $sub_state['step'] = 1;
                     if (isset($sub_state['hash'])) {
@@ -405,11 +405,11 @@ class RegisterModule extends PLModule
                                    S::v('uid'));
 
             // If GoogleApps is enabled, and the user did choose to use synchronized passwords,
-            // and if the (stupid) user has decided to user /register/success another time,
+            // and if the (stupid) user has decided to use /register/success another time,
             // updates the Google Apps password as well.
             if ($globals->mailstorage->googleapps_domain) {
                 require_once 'googleapps.inc.php';
-                $account = new GoogleAppsAccount(S::v('uid'), S::v('forlife'));
+                $account = new GoogleAppsAccount(S::user());
                 if ($account->active() && $account->sync_password) {
                     $account->set_password($password);
                 }