- 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.
This commit is contained in:
dave 2007-01-21 05:43:29 +00:00
parent 039a3aa1d5
commit 94639c1278
2 changed files with 8 additions and 2 deletions

View File

@ -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 "<tr><td>".i18n("Name").":</td><td><input size=\"25\" type=\"text\" name=\"name\" value=\"".htmlspecialchars($r->name)."\" /></td></tr>";
if(auth_has_access("super"))
if(auth_has_access("super") || ($_SESSION['committee_member_id'] == intval($e)))
echo "<tr><td>".i18n("Password").":</td><td><input size=\"15\" type=\"text\" name=\"password\" value=\"$r->password\" /></td></tr>";
$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");

View File

@ -419,6 +419,7 @@ echo "<h1>".i18n($config['fairname'])."</h1>";
if(auth_has_access("admin") || auth_has_access("config") || auth_has_access("super"))
{
if(auth_has_access("admin")){ ?>
<li><a href="<?=$config['SFIABDIRECTORY']?>/admin/committees.php?edit=<?=$_SESSION['committee_member_id']?>"><?=i18n("My Profile")?></a></li>
<li><a href="<?=$config['SFIABDIRECTORY']?>/admin/"><?=i18n("Fair Administration")?></a></li>
<? }
if(auth_has_access("config")){ ?>