AnsweredAssumed Answered

How can I obtain $current_user  information through my after_ui_frame logic hook in  Sugarcrm 7.1.5?

Question asked by Jeroen Somhorst on Mar 12, 2014
Latest reply on Jul 30, 2015 by Paul Carlton
I am currently trying to get functionality developed on Sugarcrm 6.7 working on Sugarcrm 7.1.5. I am using an after_ui_frame logic hook to trigger a function in a custom class which is currently located in custom/includes. In this function I use the global $current_user to check whether the user is still logged in (check whether the user_hash is available) and to obtain the eapmBean from a connecter which contains login information. However, the $current_user global does not contain an user id or name that is required.  So my question is how to solve this problem; is the way to obtain current user information changed or is there a problem with my approach?

Also in Sugarcrm 6.7 I used the $_SESSION variable to store additional information about an external login performed to another system. However, this variable is not initialized anymore. So I'm wondering whether it is still used in Sugarcrm or that I can use other strategies to add information to a users' session.

Your help is greatly appreciated!

Outcomes