bug 1192: added check for empty $_SESSION['_config']['oldlocation']
authorINOPIAE <inopiae@cacert.org>
Tue, 21 Jan 2014 08:59:53 +0000 (09:59 +0100)
committerINOPIAE <inopiae@cacert.org>
Tue, 21 Jan 2014 08:59:53 +0000 (09:59 +0100)
www/index.php

index a706ce1..138261f 100644 (file)
@@ -161,7 +161,6 @@ require_once('../includes/notary.inc.php');
                        $_SESSION['profile'] = mysql_fetch_assoc(mysql_query(
                                "select * from `users` where
                                `id`='$user_id' and `deleted`=0 and `locked`=0"));
-                       $ccatest=get_user_agreement_status($user_id,'CCA');
 
                        if($_SESSION['profile']['id'] != 0)
                        {
@@ -341,6 +340,9 @@ require_once('../includes/notary.inc.php');
                                $_SESSION['_config']['errmsg'] .= _("For your own security you must enter 5 lost password questions and answers.")."<br>";
                                $_SESSION['_config']['oldlocation'] = "account.php?id=13";
                        }
+                       if (!isset($_SESSION['_config']['oldlocation'])){
+                               $_SESSION['_config']['oldlocation']='';
+                       }
                        if (checkpwlight($pword) < 3)
                                $_SESSION['_config']['oldlocation'] = "account.php?id=14&force=1";
                        $ccatest=get_user_agreement_status($_SESSION['profile']['id'],'CCA');