code: public static function findActiveByEmailAndUsername($strEmail, $strUsername=null, array $arrOptions=array())
  	{
  		$t = static::$strTable;
  		$time = Date::floorToMinute();
  
  		$arrColumns = array("$t.email=? AND $t.login='1' AND ($t.start='' OR $t.start<='$time') AND ($t.stop='' OR $t.stop>'" . ($time + 60) . "') AND $t.disable=''");
  
  		if ($strUsername !== null)
  		{
  			$arrColumns[] = "$t.username=?";
  		}
  
  		return static::findOneBy($arrColumns, array($strEmail, $strUsername), $arrOptions);
  	}
docs: Find an active member by their e-mail-address and username
  
  @param string $strEmail    The e-mail address
  @param string $strUsername The username
  @param array  $arrOptions  An optional options array
  
  @return MemberModel|null The model or null if there is no member