add ability to disable newmember widget ahead of time

This commit is contained in:
Mario Vavti 2018-03-13 15:20:32 +01:00
parent 268b96effa
commit 09a841f3be

View File

@ -9,16 +9,17 @@ class Newmember {
if(! local_channel())
return EMPTY_STR;
if(get_pconfig(local_channel(), 'system', 'disable_newmemberwidget'))
return EMPTY_STR;
$c = \App::get_channel();
if(! $c)
return EMPTY_STR;
$a = \App::get_account();
if(! $a)
return EMPTY_STR;
if(datetime_convert('UTC','UTC',$a['account_created']) < datetime_convert('UTC','UTC', 'now - 60 days'))
return EMPTY_STR;