Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439 Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
18 lines
483 B
PHP
18 lines
483 B
PHP
<?php
|
|
// A user must be logged in.
|
|
$_template['show_message'] = false;
|
|
|
|
if (!api_is_anonymous()) {
|
|
$_template['show_message'] = true;
|
|
|
|
// Getting the current user id.
|
|
$user_id = api_get_user_id();
|
|
|
|
//Getting the current user info.
|
|
$user_info = api_get_user_info($user_id);
|
|
|
|
// You can also use template setting variables in the special variable called template.
|
|
$_template['user_info'] = $user_info;
|
|
$_template['username'] = $user_info['username'];
|
|
}
|