1 |
dpavlin |
67 |
use strict; |
2 |
|
|
use warnings; |
3 |
|
|
|
4 |
|
|
package Grep::CurrentUser; |
5 |
|
|
use base qw/Jifty::Plugin::Login::CurrentUser/; |
6 |
|
|
|
7 |
|
|
use Data::Dump qw/dump/; |
8 |
|
|
|
9 |
|
|
=head2 feeds |
10 |
|
|
|
11 |
|
|
my $feeds = Grep::CurrentUser->feeds(); |
12 |
|
|
|
13 |
|
|
Return FeedCollection of user's Feeds. |
14 |
|
|
|
15 |
|
|
=cut |
16 |
|
|
|
17 |
|
|
sub feeds { |
18 |
|
|
my $self = shift; |
19 |
|
|
|
20 |
|
|
my $feeds = Grep::Model::FeedCollection->new(); |
21 |
|
|
$feeds->limit( column => 'owner', value => $self->id ); |
22 |
|
|
|
23 |
dpavlin |
84 |
#warn "self = ",dump( $self ); |
24 |
dpavlin |
67 |
|
25 |
|
|
$self->log->debug("found ", $feeds->count, " feeds for ", $self->id ); |
26 |
|
|
|
27 |
|
|
return $feeds; |
28 |
|
|
} |
29 |
|
|
|
30 |
|
|
1; |