clockworksms.lib.php 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. <?php
  2. /* For licensing terms, see /vendor/license.txt */
  3. /**
  4. * Class Clockworksms
  5. * This script handles incoming SMS information, process it and sends an SMS if everything is right
  6. *
  7. * @package chamilo.plugin.clockworksms.lib
  8. * @author Imanol Losada <imanol.losada@beeznest.com>
  9. *
  10. * Clockworksms-Chamilo connector class
  11. */
  12. class Clockworksms
  13. {
  14. public $apiKey;
  15. public $api;
  16. public $plugin_enabled = false;
  17. /**
  18. * Constructor (generates a connection to the API)
  19. * @param string Clockworksms API key required to use the plugin
  20. * @return void
  21. */
  22. public function __construct($apiKey = null)
  23. {
  24. $plugin = ClockworksmsPlugin::create();
  25. $clockWorkSMSPlugin = $plugin->get('tool_enable');
  26. if (empty($apiKey)) {
  27. $clockWorkSMSApiKey = $plugin->get('api_key');
  28. } else {
  29. $clockWorkSMSApiKey = $apiKey;
  30. }
  31. $this->table = Database::get_main_table('user_field_values');
  32. if ($clockWorkSMSPlugin == true) {
  33. $this->apiKey = $clockWorkSMSApiKey;
  34. // Setting Clockworksms api
  35. define('CONFIG_SECURITY_API_KEY', $this->apiKey);
  36. $trimmedApiKey = trim(CONFIG_SECURITY_API_KEY);
  37. if (!empty($trimmedApiKey)) {
  38. $this->api = new Clockwork(CONFIG_SECURITY_API_KEY);
  39. } else {
  40. $this->api = new Clockwork(' ');
  41. $recipient_name = api_get_person_name(
  42. api_get_setting('administratorName'),
  43. api_get_setting('administratorSurname'),
  44. null,
  45. PERSON_NAME_EMAIL_ADDRESS
  46. );
  47. $email_form = get_setting('emailAdministrator');
  48. $emailsubject = 'Clockworksms error';
  49. $emailbody = 'Key cannot be blank';
  50. $sender_name = $recipient_name;
  51. $email_admin = $email_form;
  52. api_mail_html($recipient_name, $email_form, $emailsubject, $emailbody, $sender_name, $email_admin);
  53. }
  54. $this->plugin_enabled = true;
  55. }
  56. }
  57. /**
  58. * getMobilePhoneNumberById (retrieves a user mobile phone number by user id)
  59. * @param int User id
  60. * @return int User's mobile phone number
  61. */
  62. private function getMobilePhoneNumberById($userId)
  63. {
  64. require_once api_get_path(LIBRARY_PATH).'extra_field.lib.php';
  65. require_once api_get_path(LIBRARY_PATH).'extra_field_value.lib.php';
  66. $mobilePhoneNumberExtraField = new ExtraField('user');
  67. $mobilePhoneNumberExtraField = $mobilePhoneNumberExtraField->get_handler_field_info_by_field_variable('mobile_phone_number');
  68. $mobilePhoneNumberExtraFieldValue = new ExtraFieldValue('user');
  69. $mobilePhoneNumberExtraFieldValue = $mobilePhoneNumberExtraFieldValue->get_values_by_handler_and_field_id($userId, $mobilePhoneNumberExtraField['id']);
  70. return $mobilePhoneNumberExtraFieldValue['field_value'];
  71. }
  72. /**
  73. * send (sends an SMS to the user)
  74. * @param array Data needed to send the SMS. It is mandatory to include the
  75. * 'smsType' and 'userId' (or 'mobilePhoneNumber') fields at least.
  76. * More data may be neccesary depending on the message type
  77. * Example: $additional_parameters = array(
  78. * 'smsType' => EXAMPLE_SMS_TYPE,
  79. * 'userId' => $userId,
  80. * 'moreData' => $moreData
  81. * );
  82. * @return void
  83. */
  84. public function send($additionalParameters)
  85. {
  86. $trimmedKey = trim(CONFIG_SECURITY_API_KEY);
  87. if (!empty($trimmedKey)) {
  88. $message = array(
  89. "to" => array_key_exists("mobilePhoneNumber",$additionalParameters) ?
  90. $additionalParameters['mobilePhoneNumber'] :
  91. $this->getMobilePhoneNumberById($additionalParameters['userId']),
  92. "message" => $this->getSms($additionalParameters)
  93. );
  94. if (!empty($message['message'])) {
  95. $result = $this->api->send($message);
  96. // Commented for future message logging / tracking purposes
  97. /*if( $result["success"] ) {
  98. echo "Message sent - ID: " . $result["id"];
  99. } else {
  100. echo "Message failed - Error: " . $result["error_message"];
  101. }*/
  102. }
  103. }
  104. }
  105. /**
  106. * buildSms (builds an SMS from a template and data)
  107. * @param object ClockworksmsPlugin object
  108. * @param object Template object
  109. * @param string Template file name
  110. * @param string Text key from lang file
  111. * @param array Data to fill message variables (if any)
  112. * @return object Template object with message property updated
  113. */
  114. public function buildSms($plugin, $tpl, $templateName, $messageKey, $parameters = null)
  115. {
  116. $result = Database::select(
  117. 'selected_value',
  118. 'settings_current',
  119. array(
  120. 'where'=> array('variable = ?' => array('clockworksms_message'.$messageKey))
  121. )
  122. );
  123. if (empty($result)) {
  124. $tpl->assign('message', '');
  125. } else {
  126. $templatePath = 'clockworksms/sms_templates/';
  127. $content = $tpl->fetch($templatePath.$templateName);
  128. $message = $plugin->get_lang($messageKey);
  129. if ($parameters !== null) {
  130. $message = vsprintf($message, $parameters);
  131. }
  132. $tpl->assign('message', $message);
  133. }
  134. return $tpl->params['message'];
  135. }
  136. /**
  137. * getSms (returns an SMS message depending of its type)
  138. * @param array Data needed to send the SMS. It is mandatory to include the
  139. * 'smsType' and 'userId' (or 'mobilePhoneNumber') fields at least.
  140. * More data may be neccesary depending on the message type
  141. * Example: $additional_parameters = array(
  142. * 'smsType' => EXAMPLE_SMS_TYPE,
  143. * 'userId' => $userId,
  144. * 'moreData' => $moreData
  145. * );
  146. * @return string A ready to be sent SMS
  147. */
  148. public function getSms($additionalParameters)
  149. {
  150. $plugin = ClockworksmsPlugin::create();
  151. $tool_name = $plugin->get_lang('plugin_title');
  152. $tpl = new Template($tool_name);
  153. switch (constant('ClockworksmsPlugin::'.$additionalParameters['smsType'])) {
  154. case ClockworksmsPlugin::WELCOME_LOGIN_PASSWORD:
  155. $userInfo = api_get_user_info($additionalParameters['userId']);
  156. return $this->buildSms(
  157. $plugin,
  158. $tpl,
  159. 'welcome_login_password.tpl',
  160. 'WelcomeXLoginXPasswordX',
  161. array(
  162. api_get_setting('siteName'),
  163. $userInfo['username'],
  164. $additionalParameters['password']
  165. )
  166. );
  167. break;
  168. case ClockworksmsPlugin::NEW_FILE_SHARED_COURSE_BY:
  169. return $this->buildSms(
  170. $plugin,
  171. $tpl,
  172. 'new_file_shared_course_by.tpl',
  173. 'XNewFileSharedCourseXByX',
  174. array(
  175. api_get_setting('siteName'),
  176. $additionalParameters['courseTitle'],
  177. $additionalParameters['userUsername']
  178. )
  179. );
  180. break;
  181. case ClockworksmsPlugin::ACCOUNT_APPROVED_CONNECT:
  182. return $this->buildSms(
  183. $plugin,
  184. $tpl,
  185. 'account_approved_connect.tpl',
  186. 'XAccountApprovedConnectX',
  187. array(
  188. api_get_setting('siteName'),
  189. $tpl->params['_p']['web']
  190. )
  191. );
  192. break;
  193. case ClockworksmsPlugin::NEW_COURSE_BEEN_CREATED:
  194. return $this->buildSms(
  195. $plugin,
  196. $tpl,
  197. 'new_course_been_created.tpl',
  198. 'XNewCourseXBeenCreatedX',
  199. array(
  200. api_get_setting('siteName'),
  201. $additionalParameters['courseName'],
  202. $additionalParameters['creatorUsername']
  203. )
  204. );
  205. break;
  206. case ClockworksmsPlugin::NEW_USER_SUBSCRIBED_COURSE:
  207. return $this->buildSms(
  208. $plugin,
  209. $tpl,
  210. 'new_user_subscribed_course.tpl',
  211. 'XNewUserXSubscribedCourseX',
  212. array(
  213. api_get_setting('siteName'),
  214. $additionalParameters['userUsername'],
  215. $additionalParameters['courseCode']
  216. )
  217. );
  218. break;
  219. case ClockworksmsPlugin::NEW_COURSE_SUGGESTED_TEACHER:
  220. return $this->buildSms(
  221. $plugin,
  222. $tpl,
  223. 'new_course_suggested_teacher.tpl',
  224. 'XNewCourseSuggestedTeacherX',
  225. array(
  226. api_get_setting('siteName'),
  227. $additionalParameters['userUsername']
  228. )
  229. );
  230. break;
  231. case ClockworksmsPlugin::COURSE_OPENING_REQUEST_CODE_REGISTERED:
  232. return $this->buildSms(
  233. $plugin,
  234. $tpl,
  235. 'course_opening_request_code_registered.tpl',
  236. 'XCourseOpeningRequestCodeXRegistered',
  237. array(
  238. api_get_setting('siteName'),
  239. $additionalParameters['courseCode']
  240. )
  241. );
  242. break;
  243. case ClockworksmsPlugin::COURSE_OPENING_REQUEST_CODE_APPROVED:
  244. return $this->buildSms(
  245. $plugin,
  246. $tpl,
  247. 'course_opening_request_course_code_approved.tpl',
  248. 'XCourseOpeningRequestCourseCodeXApproved',
  249. array(
  250. api_get_setting('siteName'),
  251. $additionalParameters['courseCode']
  252. )
  253. );
  254. break;
  255. case ClockworksmsPlugin::COURSE_OPENING_REQUEST_CODE_REJECTED:
  256. return $this->buildSms(
  257. $plugin,
  258. $tpl,
  259. 'request_open_course_code_rejected.tpl',
  260. 'XRequestOpenCourseCodeXReject',
  261. array(
  262. api_get_setting('siteName'),
  263. $additionalParameters['courseCode']
  264. )
  265. );
  266. break;
  267. case ClockworksmsPlugin::COURSE_OPENING_REQUEST_CODE:
  268. return $this->buildSms(
  269. $plugin,
  270. $tpl,
  271. 'course_opening_request_course_code.tpl',
  272. 'XCourseOpeningRequestCourseCodeX',
  273. array(
  274. api_get_setting('siteName'),
  275. $additionalParameters['courseCode']
  276. )
  277. );
  278. break;
  279. case ClockworksmsPlugin::BEEN_SUBSCRIBED_COURSE:
  280. return $this->buildSms(
  281. $plugin,
  282. $tpl,
  283. 'been_subscribed_course.tpl',
  284. 'XBeenSubscribedCourseX',
  285. array(
  286. api_get_setting('siteName'),
  287. $additionalParameters['courseTitle']
  288. )
  289. );
  290. break;
  291. case ClockworksmsPlugin::ASSIGNMENT_BEEN_CREATED_COURSE:
  292. return $this->buildSms(
  293. $plugin,
  294. $tpl,
  295. 'assignment_been_created_course.tpl',
  296. 'XAssignmentBeenCreatedCourseX',
  297. array(
  298. api_get_setting('siteName'),
  299. $additionalParameters['courseTitle']
  300. )
  301. );
  302. break;
  303. // Message types to be implemented. Fill the array parameter with arguments.
  304. /*case ClockworksmsPlugin::ACCOUNT_CREATED_UPDATED_LOGIN_PASSWORD:
  305. return $this->buildSms(
  306. $plugin,
  307. $tpl,
  308. 'account_created_updated_login_password.tpl',
  309. 'XAccountCreatedUpdatedLoginXPasswordX',
  310. array(
  311. api_get_setting('siteName')
  312. )
  313. );
  314. break;*/
  315. /*case ClockworksmsPlugin::PASSWORD_UPDATED_LOGIN_PASSWORD:
  316. return $this->buildSms(
  317. $plugin,
  318. $tpl,
  319. 'password_updated_login_password.tpl',
  320. 'XPasswordUpdatedLoginXPasswordX',
  321. array(
  322. api_get_setting('siteName')
  323. )
  324. );
  325. break;*/
  326. /*case ClockworksmsPlugin::REQUESTED_PASSWORD_CHANGE:
  327. return $this->buildSms(
  328. $plugin,
  329. $tpl,
  330. 'requested_password_change.tpl',
  331. 'XPasswordUpdatedLoginXPasswordX',
  332. array(
  333. api_get_setting('siteName')
  334. )
  335. );
  336. break;*/
  337. /*case ClockworksmsPlugin::RECEIVED_NEW_PERSONAL_MESSAGES:
  338. return $this->buildSms(
  339. $plugin,
  340. $tpl,
  341. 'received_new_personal_messages.tpl',
  342. 'XReceivedNewPersonalMessages',
  343. array(
  344. api_get_setting('siteName')
  345. )
  346. );
  347. break;*/
  348. /*case ClockworksmsPlugin::NEW_USER_PENDING_APPROVAL:
  349. return $this->buildSms(
  350. $plugin,
  351. $tpl,
  352. 'new_user_pending_approval.tpl',
  353. 'XNewUserXPendingApproval',
  354. array(
  355. api_get_setting('siteName')
  356. )
  357. );
  358. break;*/
  359. /*case ClockworksmsPlugin::POSTED_FORUM_COURSE:
  360. return $this->buildSms(
  361. $plugin,
  362. $tpl,
  363. 'posted_forum_course.tpl',
  364. 'XXPostedForumXCourseX',
  365. array(
  366. api_get_setting('siteName')
  367. )
  368. );
  369. break;*/
  370. /*case ClockworksmsPlugin::CHECK_EMAIL_CONNECT_MORE_INFO:
  371. return $this->buildSms(
  372. $plugin,
  373. $tpl,
  374. 'check_email_connect_more_info.tpl',
  375. 'XXXCheckEmailConnectMoreInfo',
  376. array(
  377. api_get_setting('siteName')
  378. )
  379. );
  380. break;*/
  381. /*case ClockworksmsPlugin::STUDENT_ANSWERED_TEST:
  382. return $this->buildSms(
  383. $plugin,
  384. $tpl,
  385. 'student_answered_test.tpl',
  386. 'XXStudentXAnsweredTestX',
  387. array(
  388. api_get_setting('siteName')
  389. )
  390. );
  391. break;*/
  392. /*case ClockworksmsPlugin::STUDENT_ANSWERED_TEST_OPEN_QUESTION:
  393. return $this->buildSms(
  394. $plugin,
  395. $tpl,
  396. 'student_answered_test_open_question.tpl',
  397. 'XXStudentXAnsweredTestXOpenQuestion',
  398. array(
  399. api_get_setting('siteName')
  400. )
  401. );
  402. break;*/
  403. /*case ClockworksmsPlugin::STUDENT_ANSWERED_TEST_VOICE_QUESTION:
  404. return $this->buildSms(
  405. $plugin,
  406. $tpl,
  407. 'student_answered_test_voice_question.tpl',
  408. 'XXStudentXAnsweredTestXVoiceQuestion',
  409. array(
  410. api_get_setting('siteName')
  411. )
  412. );
  413. break;*/
  414. /*case ClockworksmsPlugin::ANSWER_OPEN_QUESTION_TEST_REVIEWED:
  415. return $this->buildSms(
  416. $plugin,
  417. $tpl,
  418. 'answer_open_question_test_reviewed.tpl',
  419. 'XXAnswerOpenQuestionTestXReviewed',
  420. array(
  421. api_get_setting('siteName')
  422. )
  423. );
  424. break;*/
  425. /*case ClockworksmsPlugin::NEW_THREAD_STARTED_FORUM:
  426. return $this->buildSms(
  427. $plugin,
  428. $tpl,
  429. 'new_thread_started_forum.tpl',
  430. 'XXNewThreadXStartedForumX',
  431. array(
  432. api_get_setting('siteName')
  433. )
  434. );
  435. break;*/
  436. /*case ClockworksmsPlugin::NEW_ANSWER_POSTED_FORUM:
  437. return $this->buildSms(
  438. $plugin,
  439. $tpl,
  440. 'new_answer_posted_forum.tpl',
  441. 'XXNewAnswerPostedXForumX',
  442. array(
  443. api_get_setting('siteName')
  444. )
  445. );
  446. break;*/
  447. /*case ClockworksmsPlugin::NEW_SYSTEM_ANNOUNCEMENT_ADDED:
  448. return $this->buildSms(
  449. $plugin,
  450. $tpl,
  451. 'new_system_announcement_added.tpl',
  452. 'XXNewSystemAnnouncementAdded',
  453. array(
  454. api_get_setting('siteName')
  455. )
  456. );
  457. break;*/
  458. /*case ClockworksmsPlugin::TEST_NEW_SYSTEM_ANNOUNCEMENT_ADDED:
  459. return $this->buildSms(
  460. $plugin,
  461. $tpl,
  462. 'test_new_system_announcement_added.tpl',
  463. 'XTestXNewSystemAnnouncementAdded',
  464. array(
  465. api_get_setting('siteName')
  466. )
  467. );
  468. break;*/
  469. /*case ClockworksmsPlugin::SYSTEM_ANNOUNCEMENT_UPDATE:
  470. return $this->buildSms(
  471. $plugin,
  472. $tpl,
  473. 'system_announcement_update.tpl',
  474. 'XXSystemAnnouncementUpdate',
  475. array(
  476. api_get_setting('siteName')
  477. )
  478. );
  479. break;*/
  480. /*case ClockworksmsPlugin::TEST_SYSTEM_ANNOUNCEMENT_UPDATE:
  481. return $this->buildSms(
  482. $plugin,
  483. $tpl,
  484. 'test_system_announcement_update.tpl',
  485. 'XXSystemAnnouncementUpdate',
  486. array(
  487. api_get_setting('siteName')
  488. )
  489. );
  490. break;*/
  491. /*case ClockworksmsPlugin::USER_UPLOADED_ASSIGNMENT_COURSE_STUDENT_SUBMITS_PAPER:
  492. return $this->buildSms(
  493. $plugin,
  494. $tpl,
  495. 'user_uploaded_assignment_course_student_submits_paper.tpl',
  496. 'XUserXUploadedAssignmentXCourseXStudentSubmitsPaper',
  497. array(
  498. api_get_setting('siteName')
  499. )
  500. );
  501. break;*/
  502. /*case ClockworksmsPlugin::USER_UPLOADED_ASSIGNMENT_CHECK_STUDENT_SUBMITS_PAPER:
  503. return $this->buildSms(
  504. $plugin,
  505. $tpl,
  506. 'user_uploaded_assignment_check_student_submits_paper.tpl',
  507. 'XUserXUploadedAssignmentXCheckXStudentSubmitsPaper',
  508. array(
  509. api_get_setting('siteName')
  510. )
  511. );
  512. break;*/
  513. /*case ClockworksmsPlugin::USER_UPLOADED_ASSIGNMENT_COURSE:
  514. return $this->buildSms(
  515. $plugin,
  516. $tpl,
  517. 'user_uploaded_assignment_course.tpl',
  518. 'XUserXUploadedAssignmentXCourseX',
  519. array(
  520. api_get_setting('siteName')
  521. )
  522. );
  523. break;*/
  524. /*case ClockworksmsPlugin::USER_UPLOADED_ASSIGNMENT_CHECK:
  525. return $this->buildSms(
  526. $plugin,
  527. $tpl,
  528. 'user_uploaded_assignment_check.tpl',
  529. 'XUserXUploadedAssignmentXCheckX',
  530. array(
  531. api_get_setting('siteName')
  532. )
  533. );
  534. break;*/
  535. /*case ClockworksmsPlugin::SUBSCRIBED_SESSION:
  536. return $this->buildSms(
  537. $plugin,
  538. $tpl,
  539. 'subscribed_session.tpl',
  540. 'XSubscribedSessionX',
  541. array(
  542. api_get_setting('siteName')
  543. )
  544. );
  545. break;*/
  546. /*case ClockworksmsPlugin::SUBSCRIBED_SESSION_CSV:
  547. return $this->buildSms(
  548. $plugin,
  549. $tpl,
  550. 'subscribed_session_csv.tpl',
  551. 'XSubscribedSessionXCSV',
  552. array(
  553. api_get_setting('siteName')
  554. )
  555. );
  556. break;*/
  557. /*case ClockworksmsPlugin::USER_SUGGESTED_BE_FRIENDS:
  558. return $this->buildSms(
  559. $plugin,
  560. $tpl,
  561. 'user_suggested_be_friends.tpl',
  562. 'XUserXSuggestedBeFriends',
  563. array(
  564. api_get_setting('siteName')
  565. )
  566. );
  567. break;*/
  568. /*case ClockworksmsPlugin::USER_ANSWERED_INBOX_MESSAGE:
  569. return $this->buildSms(
  570. $plugin,
  571. $tpl,
  572. 'user_answered_inbox_message.tpl',
  573. 'XUserXAnsweredInboxMessage',
  574. array(
  575. api_get_setting('siteName')
  576. )
  577. );
  578. break;*/
  579. /*case ClockworksmsPlugin::BEEN_INVITED_JOIN_GROUP:
  580. return $this->buildSms(
  581. $plugin,
  582. $tpl,
  583. 'been_invited_join_group.tpl',
  584. 'XBeenInvitedJoinGroupX',
  585. array(
  586. api_get_setting('siteName')
  587. )
  588. );
  589. break;*/
  590. /*case ClockworksmsPlugin::MESSAGES_SENT_EDITED_GROUP_EDITED:
  591. return $this->buildSms(
  592. $plugin,
  593. $tpl,
  594. 'messages_sent_edited_group_edited.tpl',
  595. 'XMessagesSentEditedGroupXEdited',
  596. array(
  597. api_get_setting('siteName')
  598. )
  599. );
  600. break;*/
  601. /*case ClockworksmsPlugin::MESSAGES_SENT_EDITED_GROUP_ADDED:
  602. return $this->buildSms(
  603. $plugin,
  604. $tpl,
  605. 'messages_sent_edited_group_added.tpl',
  606. 'XMessagesSentEditedGroupXAdded',
  607. array(
  608. api_get_setting('siteName')
  609. )
  610. );
  611. break;*/
  612. /*case ClockworksmsPlugin::BEEN_INVITED_COMPLETE_SURVEY_COURSE:
  613. return $this->buildSms(
  614. $plugin,
  615. $tpl,
  616. 'been_invited_complete_survey_course.tpl',
  617. 'XBeenInvitedCompleteSurveyXCourseX',
  618. array(
  619. api_get_setting('siteName')
  620. )
  621. );
  622. break;*/
  623. /*case ClockworksmsPlugin::REMINDER_ASSIGNMENT_COURSE_DUE:
  624. return $this->buildSms(
  625. $plugin,
  626. $tpl,
  627. 'reminder_assignment_course_due.tpl',
  628. 'XReminderAssignmentXCourseXDue',
  629. array(
  630. api_get_setting('siteName')
  631. )
  632. );
  633. break;*/
  634. /*case ClockworksmsPlugin::USER_DETAILS_MODIFIED:
  635. return $this->buildSms(
  636. $plugin,
  637. $tpl,
  638. 'user_details_modified.tpl',
  639. 'XUserDetailsModified',
  640. array(
  641. api_get_setting('siteName')
  642. )
  643. );
  644. break;*/
  645. default:
  646. return '';
  647. }
  648. }
  649. }