small fixes for editting accounts

This commit is contained in:
skeeter 2000-12-29 04:33:29 +00:00
parent b068905f32
commit 4985bb1605
2 changed files with 4 additions and 7 deletions

View File

@ -95,10 +95,7 @@
// The following sets any default preferences needed for new applications..
// This is smart enough to know if previous preferences were selected, use them.
if (count($new_apps)) {
$phpgw->db->query("select account_id from accounts where account_lid='$new_loginid'",__LINE__,__FILE__);
$phpgw->db->next_record();
$pref = new preferences($phpgw->db->f("account_id"));
$pref = new preferences($n_loginid);
$docommit = False;
for ($j=0;$j<count($new_apps);$j++) {

View File

@ -235,11 +235,11 @@
$db->query("delete from preferences where preference_owner='" . $this->account_id . "'",__LINE__,__FILE__);
$db->query("insert into preferences (preference_owner,preference_value) values ('"
. $this->account_id . "','" . serialize($this->preferences) . "')",__LINE__,__FILE__);
$db->query("insert into preferences (preference_owner,preference_value) values ("
. $this->account_id . ",'" . serialize($this->preferences) . "')",__LINE__,__FILE__);
if ($phpgw_info["user"]["account_id"] == $this->account_id) {
$phpgw_info["user"]["preferences"] = $this->preferences;
$phpgw->preferences->preferences = $this->get_preferences();
$phpgw->accounts->sync(__LINE__,__FILE__);
}
}