From: Jason Woofenden Date: Wed, 14 Oct 2009 08:37:41 +0000 (-0400) Subject: Tweaked "Switch Login" page X-Git-Url: https://jasonwoof.com/gitweb/?p=contractor-progress.git;a=commitdiff_plain;h=f78460b6d888bb82adebd32931d707792bc77710 Tweaked "Switch Login" page * added display of login name * added explanation * added cancel button --- diff --git a/su.html b/su.html index 5e46932..919ae94 100644 --- a/su.html +++ b/su.html @@ -8,12 +8,16 @@ -

SU to be logged in as someone else

+

Switch Login

+ +

With the links below you can quickly switch to being logged in under one of the client accounts. You will then see exactly what they see when they log in, and have exactly the same privileges to edit, etc. except that you are not prompted to fill out the tiny agreement and can still access this "Switch Login" page.

-

log in as ~client_name~

+

log in as ~client_name.html~ (~client_username~)

+

Cancel

+ diff --git a/su.php b/su.php index 92b1b85..d777117 100644 --- a/su.php +++ b/su.php @@ -41,12 +41,13 @@ function _su_main() { return './'; } - $rows = db_get_rows('people', 'id,name', 'order by name'); + $rows = db_get_rows('people', 'id,name,username', 'order by name'); if($rows) foreach($rows as $row) { - list($id, $name) = $row; + list($id, $name, $username) = $row; tem_set('client_id', $id); tem_set('client_name', $name); + tem_set('client_username', $username); tem_show('su_row'); } }