AnsweredAssumed Answered

Communicating with SugarCRM as the currently authenticated user

Question asked by community-support on Jan 13, 2014
Latest reply on Jan 13, 2014 by community-support

I have a situation where I want to write a PHP file to handle a request.  This file will only be accessed by individuals currently logged into SugarCRM, and will be on the same server that the SugarCRM is installed.

What I need to do is create an object or two, create a document and associate it with an object, and then send out an email and display something to the user.

I'm presuming that using the SOAP or REST API would be the best bet, but I'm not able to find any documentation on using that with an existing users' session.  From looking at the PHP session, I don't have their password, and I only (seem) to have the user_id.  But I do have what I think is the session ID.

So, two questions.

1) Is the REST/SOAP still the preferred method if one is already logged in?

2) How can I circumvent the login process in this sort of situation

3) Can I get username and the md5'd password from the DB?  Is it the user_hash field?



(from CraigL)