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"); ?>