Hello,
Thank you very much andopes, I took example on the cron.php file and it works !
Here is my simple php script:
Code:
<html>
<head>
</head>
<body>
<?php
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('include/entryPoint.php');
global $current_user;
$current_user = new User();
$current_user->getSystemUser();
$id = $current_user->id;
$team_id = $current_user->default_team;
echo 'User name: '.$current_user->user_name.'<br/>';
echo 'Team ID: '.$team_id.'<br/>';
echo 'Id: '.$id.'<br/>';
echo 'Last name: '.$current_user->last_name.'<br/>';
?>
</body>
</html> This is perfectly working.
Best regards,
Inv.
Bookmarks