The recipient autocomplete correctly hides the current user from its suggestions, so a sender cannot pick themselves from the list. However, this filter only works on the suggestion level. If the sender manually types their own name with a user ID (e.g. "John Doe (123)"), the value passes validation and the message is sent, creating a thread addressed to the sender alone. The same happens when a role consisting only of the sender is entered as a recipient. Since the autocomplete already prevents self-selection, the validation should reject the sender as a recipient as well.

Issue fork privatemsg-3624797

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ivnish created an issue. See original summary.

  • ivnish committed 221b42b6 on 2.0.x
    fix: #3624797 Users can send a private message to themselves by typing...
ivnish’s picture

Assigned: ivnish » Unassigned
Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.