MDL-63289 message: Deprecate is_user_non_contact_blocked method

This function has been deprecated and no other function has been
added to replace it. It was only called from can_post_message, so
its code has been moved there.
This commit is contained in:
Sara Arjona
2018-10-20 08:36:24 +02:00
parent 7983fb830e
commit e5eba802d5
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -987,11 +987,14 @@ class api {
* contact. If not then it checks to make sure the sender is in the
* recipient's contacts.
*
* @deprecated since 3.6
* @param \stdClass $recipient The user object.
* @param \stdClass|null $sender The user object.
* @return bool true if $sender is blocked, false otherwise.
*/
public static function is_user_non_contact_blocked($recipient, $sender = null) {
debugging('\core_message\api::is_user_non_contact_blocked() is deprecated', DEBUG_DEVELOPER);
global $USER, $CFG;
if (is_null($sender)) {