mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
Added some transactions
This commit is contained in:
parent
b1f5d1b2da
commit
0e768f7268
@ -234,6 +234,7 @@
|
||||
$sql = "insert into phpgw_accounts";
|
||||
$sql .= "(account_id, account_lid, account_type, account_pwd, account_firstname, account_lastname, account_lastpwd_change, account_status)";
|
||||
$sql .= "values (".$accountid.", '".$accountname."','u', '".md5($passwd)."', '".$accountname."', 'AutoCreated', ".time().", 'A')";
|
||||
$this->db->transaction_begin();
|
||||
$this->db->query($sql);
|
||||
$this->db->query("insert into phpgw_preferences (preference_owner, preference_value) values ('".$accountid."', '$default_prefs')");
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights)values('preferences', 'changepassword', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
||||
@ -244,6 +245,8 @@
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('email', 'run', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('notes', 'run', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('todo', 'run', ".$accountid.", 'u', 1)",__LINE__,__FILE__);
|
||||
$this->db->transaction_commit();
|
||||
|
||||
return $accountid;
|
||||
}
|
||||
} //end of class
|
||||
|
@ -146,7 +146,7 @@
|
||||
|
||||
if (! $phpgw->acl->check('session_only_preferences',1,'preferences'))
|
||||
{
|
||||
$this->db->lock('phpgw_preferences');
|
||||
$this->db->transaction_begin();
|
||||
$this->db->query("delete from phpgw_preferences where preference_owner='" . $this->account_id
|
||||
. "'",__LINE__,__FILE__);
|
||||
|
||||
@ -162,7 +162,7 @@
|
||||
$this->db->query("insert into phpgw_preferences (preference_owner,preference_value) values ('"
|
||||
. $this->account_id . "','" . $pref_info . "')",__LINE__,__FILE__);
|
||||
|
||||
$this->db->unlock();
|
||||
$this->db->transaction_commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user