MDL-63211 core: deprecated events for blocking/unblocking contacts
The message_contact_blocked and message_contact_unblocked events were deprecated. The reason being that you will be able to block and unblock any user, regardless if they are a contact or not. This information is also now stored in a separate DB table.
This commit is contained in:
@@ -26,6 +26,9 @@ namespace core\event;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
debugging('core\\event\\message_contact_blocked has been deprecated. Please use
|
||||
core\\event\\message_user_blocked instead', DEBUG_DEVELOPER);
|
||||
|
||||
/**
|
||||
* Message contact blocked event class.
|
||||
*
|
||||
@@ -99,4 +102,13 @@ class message_contact_blocked extends base {
|
||||
// Messaging contacts are not backed up, so no need to map them on restore.
|
||||
return array('db' => 'message_contacts', 'restore' => base::NOT_MAPPED);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event has been deprecated.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function is_deprecated() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@ namespace core\event;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
debugging('core\\event\\message_contact_unblocked has been deperecated. Please use
|
||||
core\\event\\message_user_unblocked instead', DEBUG_DEVELOPER);
|
||||
|
||||
/**
|
||||
* Message contact unblocked event class.
|
||||
*
|
||||
@@ -99,4 +102,13 @@ class message_contact_unblocked extends base {
|
||||
// Messaging contacts are not backed up, so no need to map them on restore.
|
||||
return array('db' => 'message_contacts', 'restore' => base::NOT_MAPPED);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event has been deprecated.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function is_deprecated() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user