summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-12-17 06:14:25 +0100
committerByron Jones <bjones@mozilla.com>2013-12-17 06:14:25 +0100
commit9ae8acb378094734fd000b82659350a3947ab413 (patch)
treeae54c7c1ff5c8a8726043dbda7be802e57f097fc /Bugzilla
parent739b4fa34f26da2702d1242e77dfc2cc9e22623b (diff)
downloadbugzilla-9ae8acb378094734fd000b82659350a3947ab413.tar.gz
bugzilla-9ae8acb378094734fd000b82659350a3947ab413.tar.xz
Bug 651786: Modifying the default user object modifies the DEFAULT_USER constant
r=sgreen, a=sgreen
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/User.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 7a067fce0..5c875918f 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -23,7 +23,6 @@ use Bugzilla::Group;
use DateTime::TimeZone;
use List::Util qw(max);
use Scalar::Util qw(blessed);
-use Storable qw(dclone);
use URI;
use URI::QueryParam;
@@ -118,7 +117,7 @@ sub new {
my $class = ref($invocant) || $invocant;
my ($param) = @_;
- my $user = DEFAULT_USER;
+ my $user = { %{ DEFAULT_USER() } };
bless ($user, $class);
return $user unless $param;
@@ -136,7 +135,7 @@ sub super_user {
my $class = ref($invocant) || $invocant;
my ($param) = @_;
- my $user = dclone(DEFAULT_USER);
+ my $user = { %{ DEFAULT_USER() } };
$user->{groups} = [Bugzilla::Group->get_all];
$user->{bless_groups} = [Bugzilla::Group->get_all];
bless $user, $class;