X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=su.php;h=a6acd1299cad9d79e0e0fae50e96cf53268995de;hb=e9aa2a1f7bd7bfe40a76d19f630eea6dcf446169;hp=92b1b85e01d5849468cd381f0f904436a761d970;hpb=a7d43d9737bdcdf8c906469845742414a047f166;p=contractor-progress.git diff --git a/su.php b/su.php index 92b1b85..a6acd12 100644 --- a/su.php +++ b/su.php @@ -18,9 +18,7 @@ require_once('code/wfpl/format.php'); function su_main() { - if(logged_in_as_contractor()) { - set_was_contractor(); - } elseif(!ever_was_contractor()) { + if(!ever_was_contractor()) { $GLOBALS['url'] = this_url(); message('You must be logged in as an administrator to access that function'); return 'login'; @@ -41,12 +39,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'); } }