diff --git a/admin/viewaccount.php b/admin/viewaccount.php index 4730e625af..df5a3ef9ff 100755 --- a/admin/viewaccount.php +++ b/admin/viewaccount.php @@ -12,18 +12,25 @@ /* $Id$ */ + if (! $account_id) { + $phpgw_info["flags"] = array("nonavbar" => True, "noheader" => True); + } $phpgw_info["flags"]["currentapp"] = "admin"; include("../header.inc.php"); - if (! $con) + if (! $account_id) { Header("Location: " . $phpgw->link("accounts.php")); + } - $phpgw->db->query("select loginid from accounts where con='$con'"); + $phpgw->db->query("select account_lid from accounts where account_id='$account_id'"); $phpgw->db->next_record(); - $db_perms = $phpgw->accounts->read_apps($phpgw->db->f("loginid")); + $db_perms = $phpgw->accounts->read_apps($phpgw->db->f("account_lid")); - $phpgw->db->query("select * from accounts where con='$con'"); + $phpgw->db->query("select * from accounts where account_id='$account_id'"); $phpgw->db->next_record(); + + $account_lastlogin = $phpgw->db->f("account_lastlogin"); + $account_lastloginfrom = $phpgw->db->f("account_lastloginfrom"); ?>
@@ -35,21 +42,21 @@ "> - db->f("loginid"); ?> + db->f("account_lid"); ?> "> - db->f("firstname"); ?> + db->f("account_firstname"); ?> "> - db->f("lastname"); ?> + db->f("account_lastname"); ?> "> - + " . lang("account active") . " "; - if ($phpgw->db->f("status") == "A") + if ($phpgw->db->f("account_status") == "A") echo lang("yes"); else echo "" . lang("no") . ""; @@ -73,7 +80,7 @@ "> Groups: accounts->read_group_names($phpgw->db->f("loginid")); + $user_groups = $phpgw->accounts->read_group_names($phpgw->db->f("account_lid")); for ($i=0;$i"> Last login db->f("lastlogin")) + if (! $account_lastlogin) echo "Never"; else - echo $phpgw->common->show_date($phpgw->db->f("lastlogin")); + echo $phpgw->common->show_date($account_lastlogin); ?> "> Last login from - db->f("lastloginfrom"); ?>  +