Commit 38f2d1af0077c0a43134f9d9dc8c2a5ea7f89e05

Authored by jjordaan
1 parent e6a7ab3b

KTC-646: Reporting Filter tweak to accomadate new users

Committed by: Jarrett Jordaan

Reviewed by: Megan Watson
Showing 1 changed file with 14 additions and 1 deletions
lib/users/User.inc
... ... @@ -461,15 +461,28 @@ class User extends KTEntity {
461 461 return KTEntityUtil::getList2('User', $sWhereClause);
462 462 }
463 463  
  464 + /*
  465 + * Modified : Jarrett Jordaan
  466 + * Added : Get new users and ignore any disabled or deleted users
  467 + * Date : 24/04/09
  468 + *
  469 + */
464 470 function getByLastLoginNever() {
465 471 $aOptions['orderby'] = 'name';
466   - $sWhereClause = 'last_login is null';
  472 + $sWhereClause = 'last_login is null and disabled = 0';
467 473 return KTEntityUtil::getList2('User', $sWhereClause, $aOptions);
468 474 }
469 475  
  476 + /*
  477 + * Modified : Jarrett Jordaan
  478 + * Added : Filter out disabled users
  479 + * Date : 24/04/09
  480 + *
  481 + */
470 482 function getByLastLoginAfter($dDateTime) {
471 483 return KTEntityUtil::getByDict('User', array(
472 484 'last_login' => array('type' => 'after', 'value' => $dDateTime),
  485 + 'disabled' => 0,
473 486 ), array('multi' => true));
474 487 }
475 488  
... ...