-
Notifications
You must be signed in to change notification settings - Fork 396
Mantis #46993: Filter time limit expired users from mail recipient autocomplete results #10997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release_10
Are you sure you want to change the base?
Conversation
9a5c948 to
735ab92
Compare
|
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. |
| $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) | ||
| ); |
There was a problem hiding this comment.
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)
);
| $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) | ||
| ) . " "; |
There was a problem hiding this comment.
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 | |||
|
|
|||
| /** | |||
There was a problem hiding this comment.
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.
Fixes https://mantis.ilias.de/view.php?id=46993.
If accepted should be picked into release_11 & trunk.