本文整理汇总了PHP中UserManager::get_extra_user_data_by_field方法的典型用法代码示例。如果您正苦于以下问题:PHP UserManager::get_extra_user_data_by_field方法的具体用法?PHP UserManager::get_extra_user_data_by_field怎么用?PHP UserManager::get_extra_user_data_by_field使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserManager
的用法示例。
在下文中一共展示了UserManager::get_extra_user_data_by_field方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_formatter
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid (edit, delete, etc)
/*
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.
' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=copy&id=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'.
' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'.
'\';
}';*/
$action_links = null;
$room = UserManager::get_extra_user_data_by_field(api_get_user_id(), 'exam_room');
$room = $room['exam_room'];
$schedule = UserManager::get_extra_user_data_by_field(api_get_user_id(), 'exam_schedule');
$schedule = $schedule['exam_schedule'];
echo Display::page_subheader(get_lang('UserList') . ": " . $room . " - " . $schedule);
?>
<script>
$(function() {
<?php
echo Display::grid_js('user_list', $url, $columns, $column_model, $extra_params, array(), $action_links, true);
?>
jQuery("#user_list").jqGrid("navGrid","#user_list_pager",{view:false, edit:false, add:false, del:false, search:false, excel:true});
jQuery("#user_list").jqGrid("navButtonAdd","#user_list_pager",{
caption:"",
onClickButton : function () {
jQuery("#user_list").jqGrid("excelExport",{"url": "<? echo $url?>&export_format=xls"});
}
});
示例2: _api_get_timezone
/**
* Returns the timezone to be converted to/from, based on user or admin preferences
*
* @return string The timezone chosen
*/
function _api_get_timezone()
{
// First, get the default timezone of the server
$to_timezone = date_default_timezone_get();
// Second, see if a timezone has been chosen for the platform
$timezone_value = api_get_setting('timezone_value', 'timezones');
if ($timezone_value != null) {
$to_timezone = $timezone_value;
}
// If allowed by the administrator
$use_users_timezone = api_get_setting('use_users_timezone', 'timezones');
if ($use_users_timezone == 'true') {
$userId = api_get_user_id();
// Get the timezone based on user preference, if it exists
$timezone_user = UserManager::get_extra_user_data_by_field($userId, 'timezone');
if (isset($timezone_user['timezone']) && $timezone_user['timezone'] != null) {
$to_timezone = $timezone_user['timezone'];
}
}
return $to_timezone;
}
示例3: get_user_status
/**
* Get user chat status
* @return int 0 if disconnected, 1 if connected
*/
function get_user_status()
{
$status = UserManager::get_extra_user_data_by_field(api_get_user_id(), 'user_chat_status', false, true);
return $status['user_chat_status'];
}
示例4: api_protect_course_script
api_protect_course_script(true);
$this_section = SECTION_COURSES;
if (api_is_allowed_to_edit()) {
$can_add_events = 1;
}
if (!empty($group_id)) {
if ($is_group_tutor) {
$can_add_events = 1;
}
}
break;
case 'personal':
if (api_is_anonymous(null, true)) {
api_not_allowed(true);
}
$extra_field_data = UserManager::get_extra_user_data_by_field(api_get_user_id(), 'google_calendar_url');
if (!empty($extra_field_data) && isset($extra_field_data['google_calendar_url']) && !empty($extra_field_data['google_calendar_url'])) {
$tpl->addGlobal('use_google_calendar', 1);
$tpl->addGlobal('google_calendar_url', $extra_field_data['google_calendar_url']);
}
$this_section = SECTION_MYAGENDA;
if (!api_is_anonymous()) {
$can_add_events = 1;
}
break;
}
//Setting translations
$day_short = api_get_week_days_short();
$days = api_get_week_days_long();
$months = api_get_months_long();
$months_short = api_get_months_short();
示例5: get_user_list_from_course_code
//.........这里部分代码省略.........
$sql .= ' ' . $order_by . ' ' . $limit;
$rs = Database::query($sql);
$users = array();
$extra_fields = UserManager::get_extra_fields(0, 100, null, null, true, true);
$counter = 1;
$count_rows = Database::num_rows($rs);
if ($return_count && $resumed_report) {
return $count_rows;
}
$table_user_field_value = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);
$tableExtraField = Database::get_main_table(TABLE_EXTRA_FIELD);
if ($count_rows) {
while ($user = Database::fetch_array($rs)) {
if ($return_count) {
return $user['count'];
}
$report_info = array();
$user_info = $user;
$user_info['status'] = $user['status'];
if (isset($user['is_tutor'])) {
$user_info['is_tutor'] = $user['is_tutor'];
}
if (!empty($session_id)) {
$user_info['status_session'] = $user['status_session'];
}
$sessionId = isset($user['session_id']) ? $user['session_id'] : 0;
$course_code = isset($user['code']) ? $user['code'] : null;
if ($add_reports) {
if ($resumed_report) {
$extra = array();
if (!empty($extra_fields)) {
foreach ($extra_fields as $extra) {
if (in_array($extra['1'], $extra_field)) {
$user_data = UserManager::get_extra_user_data_by_field($user['user_id'], $extra['1']);
break;
}
}
}
$row_key = '-1';
$name = '-';
if (!empty($extra)) {
if (!empty($user_data[$extra['1']])) {
$row_key = $user_data[$extra['1']];
$name = $user_data[$extra['1']];
$users[$row_key]['extra_' . $extra['1']] = $name;
}
}
$users[$row_key]['training_hours'] += Tracking::get_time_spent_on_the_course($user['user_id'], $courseId, $sessionId);
$users[$row_key]['count_users'] += $counter;
$registered_users_with_extra_field = 0;
if (!empty($name) && $name != '-') {
$extraFieldType = EntityExtraField::COURSE_FIELD_TYPE;
$name = Database::escape_string($name);
$sql = "SELECT count(v.item_id) as count\n FROM {$table_user_field_value} v INNER JOIN\n {$tableExtraField} f\n ON (f.id = v.field_id)\n WHERE value = '{$name}' AND extra_field_type = {$extraFieldType}";
$result_count = Database::query($sql);
if (Database::num_rows($result_count)) {
$row_count = Database::fetch_array($result_count);
$registered_users_with_extra_field = $row_count['count'];
}
}
$users[$row_key]['count_users_registered'] = $registered_users_with_extra_field;
$users[$row_key]['average_hours_per_user'] = $users[$row_key]['training_hours'] / $users[$row_key]['count_users'];
$category = Category::load(null, null, $course_code, null, null, $sessionId);
if (!isset($users[$row_key]['count_certificates'])) {
$users[$row_key]['count_certificates'] = 0;
}
示例6: _api_get_timezone
/**
* Returns the timezone to be converted to/from, based on user or admin preferences
*
* @return string The timezone chosen
*/
function _api_get_timezone()
{
$timezone = api_get_setting('platform.timezone');
// If allowed by the administrator
$use_users_timezone = api_get_setting('profile.use_users_timezone');
if ($use_users_timezone == 'true') {
$userId = api_get_user_id();
// Get the timezone based on user preference, if it exists
$timezone_user = UserManager::get_extra_user_data_by_field($userId, 'timezone');
if (isset($timezone_user['timezone']) && $timezone_user['timezone'] != null) {
$timezone = $timezone_user['timezone'];
}
}
return $timezone;
}
示例7: get_user_block_data
/**
* This function get user block data (block id with its number of column) from extra user data
* @param int User id
* @return array data (block_id,column)
*/
public static function get_user_block_data($user_id)
{
$user_id = intval($user_id);
$field_variable = 'dashboard';
$extra_user_data = UserManager::get_extra_user_data_by_field($user_id, $field_variable);
$extra_user_data = explode(';', $extra_user_data[$field_variable]);
$data = array();
foreach ($extra_user_data as $extra) {
$split_extra = explode(':', $extra);
if (!empty($split_extra)) {
$block_id = $split_extra[0];
$column = isset($split_extra[1]) ? $split_extra[1] : null;
$data[$block_id] = array('block_id' => $block_id, 'column' => $column);
}
}
return $data;
}
示例8: get_lang
} else {
echo get_lang('NoOfficialCode');
}
?>
</td>
</tr>
<tr>
<td><?php
echo get_lang('OnLine') . ' : ' . $online;
?>
</td>
</tr>
<?php
// Display timezone if the user selected one and if the admin allows the use of user's timezone
$timezone = null;
$timezone_user = UserManager::get_extra_user_data_by_field($user_info['user_id'], 'timezone');
$use_users_timezone = api_get_setting('profile.use_users_timezone');
if (isset($timezone_user['timezone']) && !empty($timezone_user['timezone']) && $use_users_timezone == 'true') {
$timezone = $timezone_user['timezone'];
}
if ($timezone !== null) {
?>
<tr>
<td> <?php
echo get_lang('Timezone') . ' : ' . $timezone;
?>
</td>
</tr>
<?php
}
?>
示例9: api_get_user_blocked_by_captcha
/**
* @param string $username
* @return bool
*/
function api_get_user_blocked_by_captcha($username)
{
$userInfo = api_get_user_info_from_username($username);
if (empty($userInfo)) {
return false;
}
$data = UserManager::get_extra_user_data_by_field($userInfo['user_id'], 'captcha_blocked_until_date');
if (isset($data) && isset($data['captcha_blocked_until_date'])) {
return $data['captcha_blocked_until_date'];
}
return false;
}
示例10: get_user_feeds
/**
* Get user's feeds
* @param int User ID
* @param int Limit of posts per feed
* @return string HTML section with all feeds included
* @author Yannick Warnier
* @since Dokeos 1.8.6.1
*/
public static function get_user_feeds($user, $limit = 5)
{
$feed = UserManager::get_extra_user_data_by_field($user, 'rssfeeds');
if (empty($feed)) {
return '';
}
$feeds = explode(';', $feed['rssfeeds']);
if (count($feeds) == 0) {
return '';
}
$res = '';
foreach ($feeds as $url) {
if (empty($url)) {
continue;
}
$rss = Zend\Feed\Reader\Reader::import($url);
$i = 1;
if (!empty($rss)) {
$icon_rss = '';
if (!empty($feed)) {
$icon_rss = Display::url(Display::return_icon('rss.png', '', array(), 32), Security::remove_XSS($feed['rssfeeds']), array('target' => '_blank'));
}
$res .= '<h2>' . $rss->getTitle() . '' . $icon_rss . '</h2>';
$res .= '<div class="social-rss-channel-items">';
/** @var Zend\Feed\Reader\Extension\Atom\Entry $item */
foreach ($rss as $item) {
if ($limit >= 0 and $i > $limit) {
break;
}
$res .= '<h3><a href="' . $item->getTitle() . '">' . $item->getTitle() . '</a></h3>';
$res .= '<div class="social-rss-item-date">' . $item->getDateCreated()->format('Y-m-d') . '</div>';
$res .= '<div class="social-rss-item-content">' . $item->getDescription() . '</div><br />';
$i++;
}
$res .= '</div>';
}
}
return $res;
}
示例11: get_user_feeds
/**
* Get user's feeds
* @param int User ID
* @param int Limit of posts per feed
* @return string HTML section with all feeds included
* @author Yannick Warnier
* @since Dokeos 1.8.6.1
*/
public static function get_user_feeds($user, $limit = 5)
{
if (!function_exists('fetch_rss')) {
return '';
}
$feed = UserManager::get_extra_user_data_by_field($user, 'rssfeeds');
if (empty($feed)) {
return '';
}
$feeds = explode(';', $feed['rssfeeds']);
if (count($feeds) == 0) {
return '';
}
$res = '';
foreach ($feeds as $url) {
if (empty($url)) {
continue;
}
$rss = @fetch_rss($url);
$i = 1;
if (!empty($rss->items)) {
$icon_rss = '';
if (!empty($feed)) {
$icon_rss = Display::url(Display::return_icon('social_rss.png', '', array(), 22), Security::remove_XSS($feed['rssfeeds']), array('target' => '_blank'));
}
$res .= '<h3 class="title-rss">' . $icon_rss . ' ' . $rss->channel['title'] . '</h3>';
$res .= '<div class="rss-items">';
foreach ($rss->items as $item) {
if ($limit >= 0 and $i > $limit) {
break;
}
$res .= '<h4 class="rss-title"><a href="' . $item['link'] . '">' . $item['title'] . '</a></h4>';
$res .= '<div class="rss-date">' . api_get_local_time($item['date_timestamp']) . '</div>';
$res .= '<div class="rss-content"><p>' . $item['description'] . '</p></div>';
$i++;
}
$res .= '</div>';
}
}
return $res;
}
示例12: create_user
/**
* Manage the user creation, including checking if the user hasn't been
* created previously
* @param array User data
* @param object List of migrated things
* @return array User info (from Chamilo DB)
*/
static function create_user($data, &$omigrate = null)
{
//error_log('In create_user, receiving '.print_r($data,1));
if (empty($data['uidIdPersona'])) {
error_log('User does not have a uidIdPersona');
error_log(print_r($data, 1));
return false;
//exit;
}
$data['uidIdPersona'] = strtoupper($data['uidIdPersona']);
$data['status'] = STUDENT;
if (isset($data['uidIdEmpleado'])) {
$data['status'] = COURSEMANAGER;
}
if (!isset($data['username']) || empty($data['username'])) {
$data['firstname'] = (string) trim($data['firstname']);
$data['lastname'] = (string) trim($data['lastname']);
if (empty($data['firstname']) && empty($data['lastname'])) {
$wanted_user_name = UserManager::purify_username($data['uidIdPersona']);
//$wanted_user_name = UserManager::create_unique_username(null, null);
} else {
$wanted_user_name = UserManager::create_username($data['firstname'], $data['lastname']);
}
$extra_data = UserManager::get_extra_user_data_by_value('uidIdPersona', $data['uidIdPersona']);
if ($extra_data) {
$user_info = api_get_user_info($extra_data[0]);
//print_r($extra_data);
//error_log("User_already_added - {$user_info['user_id']} - {$user_info['username']} - {$user_info['firstname']} - {$user_info['lastname']}");
return $user_info;
}
if (UserManager::is_username_available($wanted_user_name)) {
$data['username'] = $wanted_user_name;
error_log("username available {$wanted_user_name}");
} else {
//the user already exists?
$user_info = UserManager::get_user_info_simple($wanted_user_name);
$user_persona = UserManager::get_extra_user_data_by_field($user_info['user_id'], 'uidIdPersona');
if (isset($user_persona['uidIdPersona']) && $data['uidIdPersona'] == $user_persona['uidIdPersona']) {
error_log("Skip user already added: {$user_info['username']}");
return $user_info;
} else {
error_log("Homonym - wanted_username: {$wanted_user_name} - uidIdPersona: {$user_persona['uidIdPersona']} - username: {$user_info['username']}");
//print_r($data);
//The user has the same firstname and lastname but it has another uiIdPersona could by an homonym
$data['username'] = UserManager::create_unique_username($data['firstname'], $data['lastname']);
error_log("homonym username created " . $data['username']);
}
}
if (empty($data['username'])) {
//Last chance to have a nice username
if (empty($data['firstname']) && empty($data['lastname'])) {
$data['username'] = UserManager::create_unique_username(uniqid());
error_log("username empty 1" . $data['username']);
} else {
$data['username'] = UserManager::create_unique_username($data['firstname'], $data['lastname']);
error_log("username empty 2" . $data['username']);
}
}
} else {
if (UserManager::is_username_available($data['username'])) {
//error_log("username available {$data['username']} ");
} else {
//the user already exists?
$user_info = UserManager::get_user_info_simple($data['username']);
$user_persona = UserManager::get_extra_user_data_by_field($user_info['user_id'], 'uidIdPersona');
if (isset($user_persona['uidIdPersona']) && (string) $data['uidIdPersona'] == (string) $user_persona['uidIdPersona']) {
//error_log("2 Skip user already added: {$user_info['username']}");
return $user_info;
} else {
//print_r($user_persona);
//error_log("2 homonym - wanted_username: {$data['username']} - uidIdPersona: {$user_persona['uidIdPersona']} - username: {$user_info['username']}");
//print_r($data);
//The user has the same firstname and lastname but it has another uiIdPersona could by an homonym
$data['username'] = UserManager::create_unique_username($data['firstname'], $data['lastname']);
//error_log("2 homonym username created ". $data['username']);
}
}
}
if (empty($data['username'])) {
error_log('No Username provided');
error_log(print_r($data, 1));
return false;
//exit;
}
$id_persona = $data['uidIdPersona'];
unset($data['uidIdPersona']);
unset($data['uidIdAlumno']);
unset($data['uidIdEmpleado']);
$data['encrypt_method'] = 'sha1';
global $api_failureList;
$api_failureList = array();
//error_log(print_r($data, 1));
$user_info = UserManager::add($data);
//.........这里部分代码省略.........
示例13: get_user_list_from_course_code
//.........这里部分代码省略.........
$sql .= " AND (access_url_id = {$current_access_url_id} ) ";
}
if ($return_count && $resumed_report) {
$sql .= ' AND field_id IS NOT NULL GROUP BY field_value ';
}
$sql .= ' ' . $order_by . ' ' . $limit;
$rs = Database::query($sql);
$users = array();
if ($add_reports) {
$extra_fields = UserManager::get_extra_fields(0, 100, null, null, true, true);
}
$counter = 1;
$count_rows = Database::num_rows($rs);
if ($return_count && $resumed_report) {
return $count_rows;
}
$table_user_field_value = Database::get_main_table(TABLE_MAIN_USER_FIELD_VALUES);
if ($count_rows) {
while ($user = Database::fetch_array($rs)) {
$report_info = array();
if ($return_count) {
return $user['count'];
}
$user_info = $user;
$user_info['status'] = $user['status'];
if (isset($user['role'])) {
$user_info['role'] = $user['role'];
}
if (isset($user['tutor_id'])) {
$user_info['tutor_id'] = $user['tutor_id'];
}
if (!empty($session_id)) {
$user_info['status_session'] = $user['status_session'];
}
$user_info['complete_name'] = api_get_person_name($user_info['firstname'], $user_info['lastname']);
if ($add_reports) {
$course_code = $user['code'];
if ($resumed_report) {
foreach ($extra_fields as $extra) {
if ($extra['1'] == $extra_field) {
$user_data = UserManager::get_extra_user_data_by_field($user['user_id'], $extra['1']);
break;
}
}
if (empty($user_data[$extra['1']])) {
$row_key = '-1';
$name = '-';
} else {
$row_key = $user_data[$extra['1']];
$name = $user_data[$extra['1']];
}
$users[$row_key]['extra_' . $extra['1']] = $name;
$users[$row_key]['training_hours'] += Tracking::get_time_spent_on_the_course($user['user_id'], $courseId, 0);
$users[$row_key]['count_users'] += $counter;
$registered_users_with_extra_field = 0;
if (!empty($name) && $name != '-') {
$name = Database::escape_string($name);
$sql = "SELECT count(user_id) as count FROM {$table_user_field_value} WHERE field_value = '{$name}'";
$result_count = Database::query($sql);
if (Database::num_rows($result_count)) {
$row_count = Database::fetch_array($result_count);
$registered_users_with_extra_field = $row_count['count'];
}
}
$users[$row_key]['count_users_registered'] = $registered_users_with_extra_field;
$users[$row_key]['average_hours_per_user'] = $users[$row_key]['training_hours'] / $users[$row_key]['count_users'];
$category = Category::load(null, null, $course_code);
if (!isset($users[$row_key]['count_certificates'])) {
$users[$row_key]['count_certificates'] = 0;
}
if (isset($category[0]) && $category[0]->is_certificate_available($user['user_id'])) {
$users[$row_key]['count_certificates']++;
}
} else {
$report_info['course'] = $user['title'];
$report_info['user'] = api_get_person_name($user['firstname'], $user['lastname']);
$report_info['time'] = api_time_to_hms(Tracking::get_time_spent_on_the_course($user['user_id'], $courseId, 0));
$category = Category::load(null, null, $course_code);
$report_info['certificate'] = Display::label(get_lang('No'));
if (isset($category[0]) && $category[0]->is_certificate_available($user['user_id'])) {
$report_info['certificate'] = Display::label(get_lang('Yes'), 'success');
}
//$report_info['score'] = Tracking::get_avg_student_score($user['user_id'], $courseId, array(), 0);
$progress = intval(Tracking::get_avg_student_progress($user['user_id'], $courseId, array(), 0));
$report_info['progress_100'] = $progress == 100 ? Display::label(get_lang('Yes'), 'success') : Display::label(get_lang('No'));
$report_info['progress'] = $progress . "%";
foreach ($extra_fields as $extra) {
$user_data = UserManager::get_extra_user_data_by_field($user['user_id'], $extra['1']);
$report_info[$extra['1']] = $user_data[$extra['1']];
}
$users[] = $report_info;
}
} else {
$users[$user['user_id']] = $user_info;
}
}
$counter++;
}
return $users;
}
示例14: api_get_user_info
/**
* Finds all the information about a user. If no paramater is passed you find all the information about the current user.
* @param $user_id (integer): the id of the user
* @return $user_info (array): user_id, lastname, firstname, username, email, ...
* @author Patrick Cool <patrick.cool@UGent.be>
* @version 21 September 2004
*/
function api_get_user_info($user_id = '', $check_if_user_is_online = false, $show_password = false, $add_extra_values = false)
{
if (empty($user_id)) {
$_user = Session::read('_user');
return api_format_user($_user);
}
$sql = "SELECT * FROM " . Database::get_main_table(TABLE_MAIN_USER) . " WHERE user_id = '" . Database::escape_string($user_id) . "'";
$result = Database::query($sql);
if (Database::num_rows($result) > 0) {
$result_array = Database::fetch_array($result);
if ($check_if_user_is_online) {
$use_status_in_platform = Online::user_is_online($user_id);
$result_array['user_is_online'] = $use_status_in_platform;
$user_online_in_chat = 0;
if ($use_status_in_platform) {
$user_status = UserManager::get_extra_user_data_by_field($user_id, 'user_chat_status', false, true);
if (intval($user_status['user_chat_status']) == 1) {
$user_online_in_chat = 1;
}
}
$result_array['user_is_online_in_chat'] = $user_online_in_chat;
}
$user = api_format_user($result_array, $show_password);
if ($add_extra_values) {
$extra_field_values = new ExtraField('user');
$user['extra_fields'] = $extra_field_values->get_handler_extra_data($user_id);
}
return $user;
}
return false;
}
示例15: header
header('Location: ' . api_get_path(WEB_PATH) . 'index.php?loginFailed=1&error=blocked_by_captcha');
exit;
}
}
}
if ($uData['auth_source'] == PLATFORM_AUTH_SOURCE || $uData['auth_source'] == CAS_AUTH_SOURCE) {
$validPassword = false;
$user = $userManager->findUserByUsername($login);
if ($user) {
$validPassword = UserManager::isPasswordValid($password, $user);
}
// The authentication of this user is managed by Chamilo itself
//$password = api_get_encrypted_password(trim(stripslashes($password)));
// Check the user's password
if (($validPassword || $cas_login) && trim($login) == $uData['username']) {
$update_type = UserManager::get_extra_user_data_by_field($uData['user_id'], 'update_type');
$update_type = $update_type['update_type'];
if (!empty($extAuthSource[$update_type]['updateUser']) && file_exists($extAuthSource[$update_type]['updateUser'])) {
include_once $extAuthSource[$update_type]['updateUser'];
}
// Check if the account is active (not locked)
if ($uData['active'] == '1') {
// Check if the expiration date has not been reached
if ($uData['expiration_date'] > date('Y-m-d H:i:s') || empty($uData['expiration_date'])) {
global $_configuration;
if (api_is_multiple_url_enabled()) {
// Check if user is an admin
$my_user_is_admin = UserManager::is_admin($uData['user_id']);
// This user is subscribed in these sites => $my_url_list
$my_url_list = api_get_access_url_from_user($uData['user_id']);
//Check the access_url configuration setting if