summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-11-19 03:20:53 +0100
committerlpsolit%gmail.com <>2007-11-19 03:20:53 +0100
commit9d6205cdb651fe3769ac58f03068dedb68e7689a (patch)
tree47414a6cf3f484e27a74fe91842ebe08843bb2c5 /Bugzilla/User.pm
parent0dadaed4ffb582ccfbc2356e7715007819d1cea2 (diff)
downloadbugzilla-9d6205cdb651fe3769ac58f03068dedb68e7689a.tar.gz
bugzilla-9d6205cdb651fe3769ac58f03068dedb68e7689a.tar.xz
Bug 399163: Bugzilla/*.pm should use transactions for database interaction - Patch by Emmanuel Seyman <eseyman@linagora.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 7cd1910c4..bd2a65ae0 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -1583,9 +1583,7 @@ sub create {
my $class = ref($invocant) || $invocant;
my $dbh = Bugzilla->dbh;
- $dbh->bz_lock_tables('profiles WRITE', 'profiles_activity WRITE',
- 'user_group_map WRITE', 'email_setting WRITE', 'groups READ',
- 'tokens READ', 'fielddefs READ');
+ $dbh->bz_start_transaction();
my $user = $class->SUPER::create(@_);
@@ -1622,7 +1620,7 @@ sub create {
VALUES (?, ?, NOW(), ?, NOW())',
undef, ($user->id, $who, $creation_date_fieldid));
- $dbh->bz_unlock_tables();
+ $dbh->bz_commit_transaction();
# Return the newly created user account.
return $user;