How to check user authentication in sugarcrm custom script

My question is stupid, but anyway. I created a script to download files based on information from a custom field. So now I need to verify that the script if the user who is trying to download the file is an authenticated sugarcrm user. Do you have any ideas?

+3
source share
1 answer

Add an entry to the SugarCRM entry point file.

Modify /custom/include/MVC/Controller/entry_point_registry.phpand add the following:

$entry_point_registry['my_entry_point'] = array('file' => 'custom/mypath/myscript.php', 'auth' => true);

Go to http://localhost/index.php?entryPoint=my_entry_point.

The last way 'auth' => truemeans that the user must be registered with sugarCRM.

+1
source

All Articles