Enabling users without a timeout to add karma.
This commit is contained in:
parent
c119638dad
commit
2f2f86316c
@ -37,7 +37,7 @@ sub can_modify_karma {
|
||||
return 1;
|
||||
}
|
||||
return DateTime->now >
|
||||
$self->last_karma_given_date->clone->add( minutes => 1 );
|
||||
$self->last_karma_given_date->add( minutes => 1 );
|
||||
}
|
||||
|
||||
sub first_name {
|
||||
@ -81,7 +81,10 @@ sub id_user {
|
||||
if ( defined $last_karma_given_date ) {
|
||||
$self->{last_karma_given_date} = $last_karma_given_date;
|
||||
}
|
||||
return $self->{last_karma_given_date}->clone;
|
||||
if ( defined $self->{last_karma_given_date} ) {
|
||||
return $self->{last_karma_given_date}->clone;
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user