Results 1 to 4 of 4

Thread: current_user help

  1. #1
    Join Date
    Jan 2010
    Posts
    7

    Default current_user help

    Hi all,
    I developed an external page, located on the same directory of sugarcrm files, that extends the opportunity behavior with custom data and custom relation to other applications.
    This page is connected to the Opportunity page via custom button added to the relative vardef page.
    Now I need to verify if the request came from an authenticated SUGARCRM user, if not I want redirect the request to the SUGARCRM login page.
    So I tryed using "global $current_user; $current_user->id ... " but I get only an empty string.
    Do I missing something?

    Any help is appreciated.
    TIA, Ax.

  2. #2
    abhax's Avatar
    abhax is offline Senior Member
    Join Date
    Jun 2010
    Location
    India
    Posts
    65

    Smile Re: current_user help

    Hi,

    take a look at the modules/Users/Authenticate.php
    that the file which is used for user authentication and redirection of the user..
    that might help you out...



    Hope it is helpful !!!
    If It Is To Be, It Is Up To Me

  3. #3
    Join Date
    Jan 2010
    Posts
    7

    Default Re: current_user help

    Thank you abhax but I'm still in truble with the $current_user global variable.
    It's seems that my page can't access global variable nor session variables, all of these variables are empty.
    Do I have to register in some way my custom page?

    Ax

  4. #4
    R3dian is offline Junior Member
    Join Date
    May 2011
    Posts
    8

    Default Re: current_user help

    Include following line in the start of page

    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    it will work fine

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. how to get Roles like $current_user???
    By m3suriya in forum Developer Help
    Replies: 0
    Last Post: 2010-07-13, 01:45 PM
  2. Replies: 2
    Last Post: 2010-05-05, 10:00 PM
  3. get current_user
    By ckd1987 in forum Developer Help
    Replies: 6
    Last Post: 2009-08-04, 07:30 AM
  4. query on mass update and $current_user
    By VeonConsulting in forum Developer Help
    Replies: 0
    Last Post: 2007-11-08, 12:24 PM
  5. How to change current_user system wide
    By ElChef in forum Developer Help
    Replies: 0
    Last Post: 2006-06-17, 10:47 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
  •