Browse code

Redirect non-customer users to the right overview page

Bernd Wurst authored on22/05/2012 15:04:39
Showing1 changed files
... ...
@@ -106,8 +106,13 @@ elseif ($_GET['action'] == 'edit')
106 106
       system_failure('Ung├╝ltige Shell');
107 107
 
108 108
   set_account_details($account);
109
-  if (! ($debugmode || $error))
110
-    header('Location: account');
109
+  if (! ($debugmode || $error)) {
110
+    $location = 'myaccount';
111
+    if ($_SESSION['role'] & ROLE_CUSTOMER) {
112
+      $location = 'account';
113
+    }
114
+    header('Location: '.$location);
115
+  }
111 116
   
112 117
 }
113 118
 elseif ($_GET['action'] == 'delete')