improvements to 1.244 suggested by Tomas
[squirrelmail.git] / src / options_identities.php
index 026ae1f1a56c37dc50034f9c4581b81b353a7b20..e6f348d4706d3f8273534578f3fd962a0f75fc65 100644 (file)
@@ -21,6 +21,13 @@ require('../include/init.php');
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'functions/identity.php');
 
+/* make sure that page is not available when $edit_identity is false */
+if (!$edit_identity) {
+    error_box(_("Editing identities is disabled."));
+    $oTemplate->display('footer.tpl');
+    die();
+}
+
 if (!sqgetGlobalVar('identities', $identities, SQ_SESSION)) {
     $identities = get_identities();
 }