Until I installed 6.x-1.0-rc1 version of UR, Privatemsg would allow autocomplete of anyone's name when writing a message.

rc1 introduced a bug noted here 514012 in the code for private message autocomplete. I installed the Jul12 dev version and that corrected that problem. Autocomplete works, but only for those users that have a relationship established. Messages can be sent to anyone if the name is entered without relying on autocomplete.

But, I want the private messaging autocomplete to not be limited to only those with relationships. I cannot see where I can configure the UR module to turn that feature off. I commented out the code for user_relationships_api_privatemsg_sql_autocomplete_alter in user_relationships_api.privatemsg.inc, but that is not a good solution.

I know others wanted to limit Privatemsg (see 458046), but that option should really have a switch somewhere. Am I missing it?

CommentFileSizeAuthor
#5 user_relationships_api-522078-5.patch658 bytesfuerst
#2 Picture 6.png44.84 KBalex.k

Comments

alex.k’s picture

Category: support » feature
Issue tags: +rc2block

It sounds like the switch needs to be added, you are right.

alex.k’s picture

Assigned: Unassigned » alex.k
Status: Active » Fixed
StatusFileSize
new44.84 KB

Added admin options, committed in http://drupal.org/cvs?commit=251260. Please visit User Relationships admin settings page and check them. Default behavior is to enable Privatemsg between all users. Screenshot of new options attached.

Status: Fixed » Closed (fixed)

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

fuerst’s picture

Component: User interface » Code
Category: feature » bug
Status: Closed (fixed) » Active

The autocompletion in the Private Message module will be restricted as soon as the Restrict Private Messaging to only related users setting in admin/user/relationships/settings is set to the 2nd or 3rd value. The Suggest only relationships in To: field setting doesn't matter whereas it should instead of the setting of Restrict Private Messaging to only related users.

Reason is: in user_relationships/user_relationships_api/user_relationships_api.privatemsg.inc 1.1.2.7 the killswitch for autocomplete was replaced by the function user_relationships_api_privatemsg_restrict(). Instead of checking the killswitch (variable user_relationships_privatemsg_autocomplete_alter) this function checks for the variable user_relationships_restrict_privatemsg. This is not the expected behaviour, doesn't it?

fuerst’s picture

Version: 6.x-1.x-dev » 6.x-1.0-rc4
Status: Active » Needs review
StatusFileSize
new658 bytes

Since user_relationships_api_privatemsg_restrict() is used in user_relationships_api_privatemsg_block_message() too the check for user_relationships_privatemsg_autocomplete_alter can not be added to user_relationships_api_privatemsg_restrict(). It must be added to user_relationships_api_privatemsg_sql_autocomplete_alter() directly. The attached patch does that.

berdir’s picture

Status: Needs review » Reviewed & tested by the community

Looks correct.

alex.k’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -rc2block

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