Hello! We are having two issues:
1) With Mail.SendMailToGroup:
When the sender is the UserGroup owner, everyone gets the message, but when the sender is a member, the owner does not get the message.
Is that intended? Where should we look at?
2) When adding contacts with User.AddContact
We have an input field in which players can type the username of the player they want add.
But in the case of numeric usernames (like 1418), the invite goes to user with that id, not with that username.
We use the AddContact(string, ...) method and I checked User.cs that form.AddField("Username") is filled and form.AddField("Id") is ignored.
Is there a way to handle that?
Hi Rained,
I'll check your issue report and get back with a fix.
FRANCESCO CROCETTI @ SKARED CREATIONS
Thanks!
Were you able to reproduce?
Edit /mail.php:
- replace line 131 with the following:
$user = $isId ? newAccount($id) : Account::LoadByUsername($id);
- replace the else if statement at lines 156-168 with the following:
} else if (isset($WS_REQUEST["IdGroup"])) { $groupId = intval($WS_REQUEST["IdGroup"]); $group = new UserGroup($groupId); if ($group->Id > 0) { // Get the recipients from the group $members = $group->GetMembersAccount(); $addOwner = TRUE; foreach ($members as $user) { $recipients[] = $user; if ($user->Id == $group->IdOwner) { $addOwner = FALSE; } } if ($group->IdOwner > 0 && $addOwner) { $recipients[] = new Account($group->IdOwner); } } else { $groupId = 0; } }
Edit /contacts.php:
- replace line 84 with the following:
$user = Account::LoadByUsername($username);
These changes will be also included in the next update.
FRANCESCO CROCETTI @ SKARED CREATIONS
Thanks, both fixed!