summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
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;