forked from extern/egroupware
Fixed illegal index type errors, fixed permission sorting, fixed account active not showing up
This commit is contained in:
parent
4d0970d8a6
commit
75a45c9405
@ -88,7 +88,7 @@
|
||||
}
|
||||
$docommit = False;
|
||||
for ($j=0;$j<count($new_apps);$j++) {
|
||||
if (!$phpgw_newuser["user"]["preferences"][$new_apps[$j]]) {
|
||||
if (! @$phpgw_newuser["user"]["preferences"][$new_apps[$j]]) {
|
||||
$phpgw->common->hook_single("add_def_pref", $new_apps[$j]);
|
||||
$docommit = True;
|
||||
}
|
||||
@ -121,7 +121,6 @@
|
||||
$phpgw->template->set_var("error_messages","");
|
||||
}
|
||||
|
||||
|
||||
$userData = $phpgw->accounts->read_userData($account_id);
|
||||
$db_perms = $phpgw->accounts->read_apps($userData["account_lid"]);
|
||||
|
||||
@ -172,7 +171,10 @@
|
||||
$phpgw->template->set_var("groups_select",$groups_select);
|
||||
|
||||
$i = 0;
|
||||
while ($permission = each($phpgw_info["apps"])) {
|
||||
$sorted_apps = $phpgw_info["apps"];
|
||||
asort($sorted_apps);
|
||||
reset($sorted_apps);
|
||||
while ($permission = each($sorted_apps)) {
|
||||
if ($permission[1]["enabled"]) {
|
||||
$perm_display[$i][0] = $permission[0];
|
||||
$perm_display[$i][1] = $permission[1]["title"];
|
||||
@ -201,10 +203,11 @@
|
||||
$perm_html .= "></td></tr>";
|
||||
$i++;
|
||||
}
|
||||
$perm_html .= '<tr><td colspan="4" align="center">' . lang("Account active") . ': <input type="checkbox" name="n_account_status" value="A"' . ($userData["status"]?" checked":"") . '></td></tr>';
|
||||
|
||||
$phpgw->template->set_var("permissions_list",$perm_html);
|
||||
|
||||
$phpgw->template->set_var("lang_button",lang("Edit"));
|
||||
|
||||
$phpgw->template->pparse("out","form");
|
||||
|
||||
/*
|
||||
|
@ -52,11 +52,11 @@
|
||||
"firstname" => $n_firstname, "lastname" => $n_lastname,
|
||||
"passwd" => $n_passwd,
|
||||
"groups" => $phpgw->accounts->groups_array_to_string($n_groups)));
|
||||
$phpgw->db->query("SELECT account_permissions FROM accounts WHERE account_lid='$n_loginid'");
|
||||
$phpgw->db->query("SELECT account_permissions FROM accounts WHERE account_lid='$n_loginid'",__LINE__,__FILE__);
|
||||
$phpgw->db->next_record();
|
||||
$apps = explode(":",$phpgw->db->f("account_permissions"));
|
||||
$phpgw->common->hook_single("add_def_pref", "admin");
|
||||
for($i=1;$i<=sizeof($apps);$i++) {
|
||||
for ($i=1;$i<=sizeof($apps);$i++) {
|
||||
$appname = $apps[$i];
|
||||
$phpgw->common->hook_single("add_def_pref", $appname);
|
||||
}
|
||||
@ -110,7 +110,10 @@
|
||||
|
||||
$phpgw->template->set_var("","");
|
||||
$i = 0;
|
||||
while ($permission = each($phpgw_info["apps"])) {
|
||||
$sorted_apps = $phpgw_info["apps"];
|
||||
asort($sorted_apps);
|
||||
reset($sorted_apps);
|
||||
while ($permission = each($sorted_apps)) {
|
||||
if ($permission[1]["enabled"]) {
|
||||
$perm_display[$i][0] = $permission[0];
|
||||
$perm_display[$i][1] = $permission[1]["title"];
|
||||
|
@ -468,15 +468,6 @@
|
||||
}
|
||||
$i++;
|
||||
|
||||
if (file_exists($phpgw_info["server"]["app_root"]."/about.php")) {
|
||||
$tabs[$i]["label"] = "about";
|
||||
$tabs[$i]["link"] = $phpgw->link($phpgw_info["server"]["webserver_url"] . "/".$phpgw_info["flags"]["currentapp"]."/about.php");
|
||||
if ($PHP_SELF == $phpgw_info["server"]["webserver_url"] . "/".$phpgw_info["flags"]["currentapp"]."/index.php") {
|
||||
$selected = $i;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
$tabs[$i]["label"] = "logout";
|
||||
$tabs[$i]["link"] = $phpgw->link($phpgw_info["server"]["webserver_url"] . "/logout.php");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user