Skip to content

Conversation

@mBeym
Copy link
Contributor

@mBeym mBeym commented Jan 28, 2026

Fixes https://mantis.ilias.de/view.php?id=46993.

If accepted should be picked into release_11 & trunk.

@dsstrassner dsstrassner added bugfix php Pull requests that update Php code labels Jan 30, 2026
@mBeym mBeym force-pushed the bugfix/ilias10/mail/recipient-autocomplete-filter-time-limit-expired-users branch from 9a5c948 to 735ab92 Compare February 3, 2026 13:19
@klao
Copy link

klao commented Feb 3, 2026

This is great, thank you!

I think, for consistency reason, the uses that are not valid yet should be handled the same as expired users. That's how it is in the global search. I added comments in the code.

Comment on lines +127 to +132
$outer_conditions[] = sprintf(
'(usr_data.time_limit_unlimited = %s OR (usr_data.time_limit_unlimited = %s AND time_limit_until >= %s))',
$this->db->quote(1, ilDBConstants::T_INTEGER),
$this->db->quote(0, ilDBConstants::T_INTEGER),
$this->db->quote(time(), ilDBConstants::T_INTEGER)
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to ...?

            $outer_conditions[] = sprintf(
                '(usr_data.time_limit_unlimited = %s OR (usr_data.time_limit_unlimited = %s AND time_limit_from < %s AND time_limit_until > %s))',
                $this->db->quote(1, ilDBConstants::T_INTEGER),
                $this->db->quote(0, ilDBConstants::T_INTEGER),
                $this->db->quote(time(), ilDBConstants::T_INTEGER),
                $this->db->quote(time(), ilDBConstants::T_INTEGER)
            );

Comment on lines +68 to +73
$query .= "AND " . sprintf(
'(usr_data.time_limit_unlimited = %s OR (usr_data.time_limit_unlimited = %s AND time_limit_until >= %s))',
$this->db->quote(1, ilDBConstants::T_INTEGER),
$this->db->quote(0, ilDBConstants::T_INTEGER),
$this->db->quote(time(), ilDBConstants::T_INTEGER)
) . " ";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to ...?

            $query .= sprintf(
                'AND (usr_data.time_limit_unlimited = %s OR (usr_data.time_limit_unlimited = %s AND time_limit_from < %s AND time_limit_until > %s)) ',
                $this->db->quote(1, ilDBConstants::T_INTEGER),
                $this->db->quote(0, ilDBConstants::T_INTEGER),
                $this->db->quote(time(), ilDBConstants::T_INTEGER),
                $this->db->quote(time(), ilDBConstants::T_INTEGER)
            );

@@ -1,27 +1,22 @@
<?php

/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create a seperte PR for the modifications of this file, since this does belong to another component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants