Add check on user connected + small code style fixes - refs CT#279

1.10.x
Yannick Warnier 9 years ago
parent 7e337f85e3
commit 1f5c4a5713
  1. 14
      main/social/vcard_export.php

@ -1,12 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
/**
* VCard Generator
*
* @package chamilo.social
*
* @package chamilo.social
* @author José Loguercio Silva <jose.loguercio@beeznest.com>
*/
@ -14,12 +11,11 @@ require_once '../inc/global.inc.php';
use JeroenDesloovere\VCard\VCard;
parse_str($_SERVER['QUERY_STRING'], $params);
api_block_anonymous_users();
if(isset($params['userId'])) {
$userId = $params['userId'];
}
else {
if (isset($_REQUEST['userId'])) {
$userId = intval($_REQUEST['userId']);
} else {
api_not_allowed();
die();
}

Loading…
Cancel
Save