Hello, does anybody know how I can do a login using the sugar webservices using the sugar user logged?
I need to know who is the user logged. Is there any way using the sugarbean?![]()
Hello, does anybody know how I can do a login using the sugar webservices using the sugar user logged?
I need to know who is the user logged. Is there any way using the sugarbean?![]()
__
Federico Piazza
Developer
Argentina
Hi Federico
Your needs is not so clear.
Can you explain in details what you are meaning to do?
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
hi, andopes.
I'm using sugar 5.0.0d and I've installed the enhancedStudio module to it. This module adds a new type of field named 'code'. In this code field, we can add php code, so we can access to the sugarbean of the specific module.
For example, if we add a custom field of code type to the detailview of contact, and we put to it the following code:
echo "The contact name is: " . $bean->name;
then, when we access to detailview of a contact, we will see in the field that we've added the message "The contact name is John Doe"
My question is, how can I get the user logged to sugar? Can I do this using a sugarbean? Is there any session variable that saves the user logged?
Thanks for your time
cheers
__
Federico Piazza
Developer
Argentina
Hi Federico
Contact directly the Enhanced Studio developer.
He can easily answer that question.
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
The current user is stored in $current_user, after a global statement you have full access.
global $current_user;
$userid = $current_user->id;
Some example fields that a accessable:
[name] => Administrator
[full_name] => Administrator
[id] => 1
[user_name] => admin
[user_hash] => b8c25af11984801275dec87d8d481532
[salutation] =>
[first_name] =>
[last_name] => Administrator
[date_entered] => 05.06.2008 21:57
[date_modified] => 05.06.2008 21:57
[modified_user_id] => 1
[created_by] =>
[created_by_name] =>
[modified_by_name] =>
[description] =>
[phone_home] =>
[phone_mobile] =>
[phone_work] =>
[phone_other] =>
[phone_fax] =>
[email1] =>
[email2] =>
[address_street] =>
[address_city] =>
[address_state] =>
[address_postalcode] =>
[address_country] =>
[status] => Active
[title] => Administrator
[portal_only] => 0
[department] =>
[authenticated] =>
[error_string] =>
[is_admin] => 1
[employee_status] =>
[messenger_id] =>
[messenger_type] =>
[is_group] => 0
[accept_status] =>
[receive_notifications] => 1
[reports_to_name] =>
[reports_to_id] =>
Last edited by kuske; 2008-09-18 at 07:49 PM.
Harald Kuske
Pre-Sales Engineer Central Europe
SUGARCRM Deutschland GmbH
Erika-Mann-Str. 53, 80636 Munich, Germany
Email: hkuske@sugarcrm.com
Home: http://www.sugarcrm.com
hello kuske, thanks for your detailed answer, it is great to know that.
I take to ask you, how can I do to know all the field that I can access?
thank you very much for your help
__
Federico Piazza
Developer
Argentina
just write a
global $current_user;
$GLOBALS['log']->fatal(print_r($current_user,true));
anywhere in a module and you will see the whole current_user entry in the logfile.
Harald Kuske
Pre-Sales Engineer Central Europe
SUGARCRM Deutschland GmbH
Erika-Mann-Str. 53, 80636 Munich, Germany
Email: hkuske@sugarcrm.com
Home: http://www.sugarcrm.com
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks