function sendRequest($userId, $usernames, $messageInfo, $shieldType = 'notice_website', $typeName = null) { $usernames = M::_getUnShieldUsers($usernames, $shieldType); if (!$usernames) { return false; } $messageServer = L::loadClass("message", 'message'); $typeName = $typeName ? $typeName : 'request_friend'; $typeId = $messageServer->getConst($typeName); return $messageServer->sendRequest($userId, $usernames, $messageInfo, $typeId); }