Permalink
Browse files

Merge pull request #26 from barbie/master

return registered user lists in WebAPI
  • Loading branch information...
2 parents 5622a1c + 1bee866 commit cfc0408f7266f8751baa99152ef497c14c5803bf @maddingue maddingue committed Nov 14, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 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;
}

0 comments on commit cfc0408

Please sign in to comment.