From 6a0d9884b6c51a4ae69a56ab58c338465f7a2a6d Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sat, 18 Jun 2011 15:57:15 +0200 Subject: change the informations returned Signed-off-by: franck cuny --- lib/StarGit/Info.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/StarGit/Info.pm b/lib/StarGit/Info.pm index 589ef01..c7b82c7 100644 --- a/lib/StarGit/Info.pm +++ b/lib/StarGit/Info.pm @@ -15,15 +15,16 @@ with qw( sub get { my $self = shift; - my $profile = $self->db_profiles->findOne( { login => $self->login } ); - return undef unless defined $profile; + my $profile = $self->db_profiles->find_one( { login => $self->login } ); return { login => $self->login, - name => $profile->{name}, - email => $profile->{email}, - website => $profile->{website}, - gravatar => $profile->{gravatar}, + name => $profile->{name} || $self->login, + website => $profile->{blog}, + gravatar => $profile->{gravatar_id}, + indegree => $profile->{indegree}, + country => $profile->{country} || "", + language => $profile->{language} || "", }; } -- cgit v1.2.3