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?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | user_relationships_api-522078-5.patch | 658 bytes | fuerst |
| #2 | Picture 6.png | 44.84 KB | alex.k |
Comments
Comment #1
alex.k commentedIt sounds like the switch needs to be added, you are right.
Comment #2
alex.k commentedAdded 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.
Comment #4
fuerst commentedThe 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?Comment #5
fuerst commentedSince
user_relationships_api_privatemsg_restrict()is used inuser_relationships_api_privatemsg_block_message()too the check for user_relationships_privatemsg_autocomplete_alter can not be added touser_relationships_api_privatemsg_restrict(). It must be added touser_relationships_api_privatemsg_sql_autocomplete_alter()directly. The attached patch does that.Comment #6
berdirLooks correct.
Comment #7
alex.k commentedCommitted in http://drupal.org/cvs?commit=420358, thanks.