Results 1 to 2 of 2

Thread: How to get the current user name ?

  1. #1
    Heilong is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    Shanghai (China)
    Posts
    29

    Default How to get the current user name ?

    Hi everyone,

    I want to know if it's possible using a PHP code to get the current user (logged user). If it's possible how to do it ?

    Thanks,

    version 4.5.1

  2. #2
    dpatech is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    NC
    Posts
    287

    Default Re: How to get the current user name ?

    Yes, you can get it with the current_user global variable.

    PHP Code:
    global $current_user;
    echo 
    $current_user->user_name
    - Sugar Team
    dpa Technology LLC
    e-mail: dpaDeveloper@dpatechnology.com
    web: http://www.dpatechnology.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 2008-03-04, 05:22 PM
  2. Replies: 0
    Last Post: 2006-01-06, 07:28 PM
  3. Current user auto-add to events
    By aleksans in forum Developer Help
    Replies: 0
    Last Post: 2005-07-06, 01:01 PM
  4. Cannot Login
    By Dillon in forum Help
    Replies: 16
    Last Post: 2004-10-13, 02:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •