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,15 +461,28 @@ class User extends KTEntity {
461 return KTEntityUtil::getList2('User', $sWhereClause); 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 function getByLastLoginNever() { 470 function getByLastLoginNever() {
465 $aOptions['orderby'] = 'name'; 471 $aOptions['orderby'] = 'name';
466 - $sWhereClause = 'last_login is null'; 472 + $sWhereClause = 'last_login is null and disabled = 0';
467 return KTEntityUtil::getList2('User', $sWhereClause, $aOptions); 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 function getByLastLoginAfter($dDateTime) { 482 function getByLastLoginAfter($dDateTime) {
471 return KTEntityUtil::getByDict('User', array( 483 return KTEntityUtil::getByDict('User', array(
472 'last_login' => array('type' => 'after', 'value' => $dDateTime), 484 'last_login' => array('type' => 'after', 'value' => $dDateTime),
  485 + 'disabled' => 0,
473 ), array('multi' => true)); 486 ), array('multi' => true));
474 } 487 }
475 488