Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #26 from barbie/master

return registered user lists in WebAPI
  • Loading branch information...
commit cfc0408f7266f8751baa99152ef497c14c5803bf 2 parents 5622a1c + 1bee866
@maddingue maddingue authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/Act/Handler/WebAPI.pm
View
7 lib/Act/Handler/WebAPI.pm
@@ -17,6 +17,7 @@ my %Methods = (
country town web_page pm_group pause_id monk_id monk_name im email
language timezone
company address vat
+ registered
)),
},
default => [ qw(public_name email) ],
@@ -69,12 +70,14 @@ sub handler
sub _get_attendees
{
my ($m, $fields) = @_;
+ my %fields = map { $_ => 1 } @$fields;
+ my @fields = grep { !/registered/ } @$fields;
my $users = Act::User->get_items( conf_id => $Request{conference} );
my @data;
for my $user (@$users) {
- push @data, _get_fields($m, $fields, $user)
- if $user->committed;
+ push @data, _get_fields($m, \@fields, $user)
+ if($user->committed || ($user->has_registered && $fields{registered}});
}
return \@data;
}
Please sign in to comment.
Something went wrong with that request. Please try again.