Skip to content

Commit

Permalink
Bug 1162334: email_enabled value inverted in User.update RPC call
Browse files Browse the repository at this point in the history
r=glob,a=glob
  • Loading branch information
Jeff Fearn authored and globau committed May 18, 2015
1 parent 3a21f12 commit 42ae6d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 7 additions & 2 deletions Bugzilla/User.pm
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,9 @@ sub _check_is_enabled {
# Mutators
################################################################################

sub set_disable_mail { $_[0]->set('disable_mail', $_[1]); }
sub set_extern_id { $_[0]->set('extern_id', $_[1]); }
sub set_disable_mail { $_[0]->set('disable_mail', $_[1]); }
sub set_email_enabled { $_[0]->set('disable_mail', !$_[1]); }
sub set_extern_id { $_[0]->set('extern_id', $_[1]); }

sub set_login {
my ($self, $login) = @_;
Expand Down Expand Up @@ -2600,6 +2601,10 @@ i.e. if the 'insidergroup' parameter is set and the user belongs to this group.
Returns true if the user is a global watcher,
i.e. if the 'globalwatchers' parameter contains the user.
=item C<set_email_enabled>
C<bool> - Sets C<disable_mail> to the inverse of the boolean provided.
=back
=head1 CLASS FUNCTIONS
Expand Down
2 changes: 0 additions & 2 deletions Bugzilla/WebService/User.pm
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ use constant MAPPED_FIELDS => {
email => 'login',
full_name => 'name',
login_denied_text => 'disabledtext',
email_enabled => 'disable_mail'
};

use constant MAPPED_RETURNS => {
login_name => 'email',
realname => 'full_name',
disabledtext => 'login_denied_text',
disable_mail => 'email_enabled'
};

##############
Expand Down

0 comments on commit 42ae6d0

Please sign in to comment.