diff --git a/checkin_notes b/checkin_notes
index 721643a77b..d6fdc30a6f 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -2337,7 +2337,7 @@ David 19 Apr 2011
sched_types.cpp
David 19 Apr 2011
- - admin web: all specifying an SVN config dir in the web config file,
+ - admin web: allow specifying an SVN config dir in the web config file,
in case your svn requires a proxy or something.
From Boris Dayma.
@@ -2346,3 +2346,19 @@ David 19 Apr 2011
index.php
project.sample/
project.inc
+
+David 20 Apr 2011
+ - web: show "logged in as" info on every page;
+ remove funky "log out" link from user page
+ - web: go to home page on logout,
+ not dorky "you are logged out" page
+
+ html/
+ inc/
+ user.inc
+ util.inc
+ user/
+ sample_index.php
+ logout.php
+ project.sample/
+ project.inc
diff --git a/html/inc/user.inc b/html/inc/user.inc
index 9060d9c5a3..8982bb393a 100644
--- a/html/inc/user.inc
+++ b/html/inc/user.inc
@@ -211,7 +211,6 @@ function show_user_info_private($user) {
| ".tra("password")."
| ".tra("other account info").""
);
- row2("", "".tra("Log out")."");
row2(tra("User ID")."
".tra("Used in community functions")."", $user->id);
if (!no_computing()) {
row2(tra("Account key")."
".tra("Provides full access to your account")."", $user->authenticator);
diff --git a/html/inc/util.inc b/html/inc/util.inc
index b19f336632..24275f2ff5 100644
--- a/html/inc/util.inc
+++ b/html/inc/util.inc
@@ -72,10 +72,11 @@ function get_user_from_id($id) {
}
$g_logged_in_user = null;
+$got_logged_in_user = false;
function get_logged_in_user($must_be_logged_in=true) {
- global $g_logged_in_user;
- if ($g_logged_in_user) return $g_logged_in_user;
+ global $g_logged_in_user, $got_logged_in_user;;
+ if ($got_logged_in_user) return $g_logged_in_user;
check_web_stopped();
@@ -101,13 +102,23 @@ function get_logged_in_user($must_be_logged_in=true) {
return $g_logged_in_user;
}
-function show_login($user) {
+function show_login_info() {
+ $user = get_logged_in_user(false);
+ echo "
+
+ ";
if ($user) {
- echo tra("Logged in as %1.", $user->name)."\n";
- echo " ".tra("Log in as someone else.")."\n"; + $url_tokens = url_tokens($user->authenticator); + echo "$user->name | ".tra("log out").""; } else { - echo tra("Not logged in."); + echo "".tra("log in").""; } + echo " + |
+
+
-
- "; + echo "
"; |