using squirrelmail functions instead of working with $_SESSION directly
[squirrelmail.git] / plugins / change_password / functions.php
index 8b1450d5866057a72ce2ae5af5b0f6b89339a060..d798966ee9e7cae2040dfb99f88c24a2383e03ab 100644 (file)
@@ -15,7 +15,7 @@
  * Will verify the input against a set of criteria:
  * is every field supplied, does verify password match,
  * does current password validate, ..
- * These criteria are (for now) backend-independant.
+ * These criteria are (for now) backend-independent.
  *
  * @return array Array with zero or more error messages.
  */
@@ -100,12 +100,14 @@ function cpw_do_change()
 
     /* update our password stored in the session */
     $onetimepad = OneTimePadCreate(strlen($newpw));
-    $_SESSION['onetimepad'] = $onetimepad;
+    sqsession_register($onetimepad,'onetimepad');
     $key = OneTimePadEncrypt($newpw, $onetimepad);
     setcookie('key', $key, 0, $base_uri);
 
     /* make sure we write the session data before we redirect */
     session_write_close();
-    header('Location: '.SM_PATH. 'src/options.php?optmode=submit&plugin_change_password=1');
+    header('Location: '.SM_PATH. 'src/options.php?optmode=submit&optpage=change_password&plugin_change_password=1');
     exit;
-}
\ No newline at end of file
+}
+
+?>
\ No newline at end of file