diff options
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r-- | Bugzilla/User.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index d21314604..188432241 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -593,11 +593,16 @@ sub settings { return $self->{'settings'}; } +sub setting { + my ($self, $name) = @_; + return $self->settings->{$name}->{'value'}; +} + sub timezone { my $self = shift; if (!defined $self->{timezone}) { - my $tz = $self->settings->{timezone}->{value}; + my $tz = $self->setting('timezone'); if ($tz eq 'local') { # The user wants the local timezone of the server. $self->{timezone} = Bugzilla->local_timezone; @@ -2241,6 +2246,10 @@ value - the value of this setting for this user. Will be the same is_default - a boolean to indicate whether the user has chosen to make a preference for themself or use the site default. +=item C<setting(name)> + +Returns the value for the specified setting. + =item C<timezone> Returns the timezone used to display dates and times to the user, |