From 94639c1278e56107c80a17db7614407c53971c8a Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 21 Jan 2007 05:43:29 +0000 Subject: [PATCH] - Allow a committee member to edit the password in their own profile (if they have admin access to access the committee editor) - Put a "My Profile" link on the main nav bar once a committee member logs in, so they don't have to find themselves thorugh the committee editor. It takes them right to editing their own profile. --- admin/committees.php | 9 +++++++-- common.inc.php | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/admin/committees.php b/admin/committees.php index 297599c..ce94701 100644 --- a/admin/committees.php +++ b/admin/committees.php @@ -179,7 +179,12 @@ if($_POST['save']) $access="access_admin='$a_admin', access_config='$a_config', access_super='$a_super', "; $pass="password='".mysql_escape_string(stripslashes($_POST['password']))."', "; } - else + else if(intval($_POST['save']) == $_SESSION['committee_member_id']) + { + $access=""; + $pass="password='".mysql_escape_string(stripslashes($_POST['password']))."', "; + } + else { $access=""; $pass=""; @@ -280,7 +285,7 @@ if($_GET['edit'] || $edit) echo "".i18n("Name").":name)."\" />"; - if(auth_has_access("super")) + if(auth_has_access("super") || ($_SESSION['committee_member_id'] == intval($e))) echo "".i18n("Password").":password\" />"; $cq=mysql_query("SELECT committees.name, committees.id, committees_link.title, committees_link.ord FROM committees,committees_link WHERE committees_link.committees_id=committees.id AND committees_link.committees_members_id='$e' ORDER BY committees.name"); diff --git a/common.inc.php b/common.inc.php index 3f5984b..659b582 100644 --- a/common.inc.php +++ b/common.inc.php @@ -419,6 +419,7 @@ echo "

".i18n($config['fairname'])."

"; if(auth_has_access("admin") || auth_has_access("config") || auth_has_access("super")) { if(auth_has_access("admin")){ ?> +