-
Notifications
You must be signed in to change notification settings - Fork 48
Fix groups receipts #107
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
Merged
Merged
Fix groups receipts #107
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
443a01e
Fix trying to deliver messages to usernames of group members instead …
chusopr 7370d7f
Fix members e-mail addresses when editing a group.
chusopr db4f86b
Replicate commit 443a01e in single-file exim configuration.
chusopr 6e5ef52
Prepend table names in select fields as suggested by @rimas-kudelis.
chusopr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,7 +75,7 @@ class="textfield"> | |
| <tr> | ||
| <td colspan="2"> | ||
| <?php | ||
| $query = "SELECT u.realname, u.username, u.enabled, c.member_id | ||
| $query = "SELECT u.realname, u.localpart, u.enabled, c.member_id | ||
| FROM users u, group_contents c | ||
| WHERE u.user_id=c.member_id and c.group_id=:group_id | ||
| ORDER BY u.enabled desc, u.realname asc"; | ||
|
|
@@ -106,7 +106,7 @@ class="textfield"> | |
| </a> | ||
| </td> | ||
| <td><?php echo $row['realname']; ?></td> | ||
| <td><?php echo $row['username']; ?></td> | ||
| <td><?php echo $row['localpart'].'@'.$_SESSION['domain']; ?></td> | ||
| <td> | ||
| <?php | ||
| if($row['enabled']='1') { | ||
|
|
@@ -143,7 +143,7 @@ class="textfield"> | |
| <select name="usertoadd"> | ||
| <option selected value=""></option> | ||
| <?php | ||
| $query = "SELECT realname, username, user_id FROM users | ||
| $query = "SELECT realname, localpart, user_id FROM users | ||
| WHERE enabled='1' AND domain_id=:domain_id AND type!='fail' | ||
| ORDER BY realname, username, type desc"; | ||
| $sth = $dbh->prepare($query); | ||
|
|
@@ -152,7 +152,7 @@ class="textfield"> | |
| ?> | ||
| <option value="<?php echo $row['user_id']; | ||
| ?>"><?php echo $row['realname']; | ||
| ?>(<?php echo $row['username']; ?>)</option> | ||
| ?> (<?php echo $row['localpart'].'@'.$_SESSION['domain']; ?>)</option> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here as well. |
||
| <?php | ||
| } | ||
| ?> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I wonder if joining the query with the
domainstable and using the domain name from that table wouldn't be a better idea.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.
This is what I thought at a first time, but later I saw that it's only allowed to add users in the same domain as the group and that we already have that domain name in
$_SESSION["domain"]as it's already used in the same file in https://github.com/ultreia-es/vexim2/blob/dafd10b/vexim/admingroupchange.php#L45 so there is no need to add more tables to SQL query.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.
Okay, that makes sense. Thanks!