MDL-34535 message: userto should use is_number instead of is_init

This commit is contained in:
Ankit Agarwal 2012-08-14 14:41:00 +08:00
parent 87e9331d93
commit 194ab42205

View File

@ -60,7 +60,7 @@ function message_send($eventdata) {
//TODO: we need to solve problems with database transactions here somehow, for now we just prevent transactions - sorry
$DB->transactions_forbidden();
if (is_int($eventdata->userto)) {
if (is_number($eventdata->userto)) {
$eventdata->userto = $DB->get_record('user', array('id' => $eventdata->userto));
}
if (is_int($eventdata->userfrom)) {