Results 1 to 5 of 5

Thread: Open user's home page from desktop application without login screen

  1. #1
    fedepia is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    Rosario, Argentina
    Posts
    104

    Exclamation Open user's home page from desktop application without login screen

    Hello people, how are you? i have a java desktop application with several things, and one of this is a section that calles to sugar.

    So, what can i do to call sugar passing some parameters (like username and pass) skipping the login screen, to show a user's home page?

    I need any way to call from desktop application to a browser with sugar already logged and showing a user's home page

  2. #2
    sacramentojoe is offline Sugar Community Member
    Join Date
    Nov 2005
    Posts
    447

    Default Re: Open user's home page from desktop application without login screen

    Well, if you are using a java desktop, then you can use the SOAP api to do seemless login and then display your home page and whatever else you want.
    If you're talking about a Widget like Google Desktop, you'll need to write your own.

  3. #3
    fedepia is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    Rosario, Argentina
    Posts
    104

    Default Re: Open user's home page from desktop application without login screen

    hello joe, thanks for your reply. So, i looked for seemless login, and in my java application i tested the follow:
    - call to login web service (using the admin user) <--- this returned a session id
    - call to seamless login web service using last session id <---- this returned an integer, i.e. '1'
    and then... i don't know how to show an user home page...

    i tested with an exec funcion using it like this:
    cmd.exe /C explorer "http://localhost/sugarcrm/index.php?module=Home&action=index"

    but... it always redirects to login page

    i don't know what i can do to log an user, and then open a browser the sugar already logged.

    Any suggerence?

    Cheers!

  4. #4
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Open user's home page from desktop application without login screen

    It depends on if you have the password on hand or not. If you do you can simply do something like:

    PHP Code:
    http://testdomain/sugar_test/index.php?action=Authenticate&module=Users&user_name=my_user_name&user_password=my_password&login_theme=Sugar&login_language=en_us&login_module=Accounts&login_action=index 
    If not you'd need to query the database but since the password is encrypted you might have to do what we did and use the user_hash to authenticate like:

    PHP Code:
    http://testdomain/sugar_test/index.php?action=Authenticate&module=Users&user_name=my_user_name&user_hash=my_user_hash_from_db&login_theme=Sugar&login_language=en_us&login_module=Accounts&login_action=index 
    If passing in a user_hash is acceptable to you there are just a couple of changes to make to allow that to work.

    modules/Users/Authenticate.php:
    PHP Code:
    /** [IC] 2007/06/21 eggsurplus: too allow screen popup from call software */
     
    $authController->login($_REQUEST['user_name'],(isset( $_REQUEST['user_hash'])? $_REQUEST['user_hash']:$_REQUEST['user_password']));
    //$authController->login($_REQUEST['user_name'], $_REQUEST['user_password']); 
    modules/Users/Authenticate/SugarAuthenticate/SugarAuthenticate.php -> loadUserOnLogin():
    PHP Code:
            $user_id $this->authenticateUser($name$user_hash);
            
    /** [IC] 2007/06/21 eggsurplus: too allow screen popup from call software */
            /** if password above doesn't work check to see if a hash would authenticate  below */
            
    if(empty($user_id)) {
                
    $user_id $this->authenticateUser($name$password);
            } 

  5. #5
    fedepia is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    Rosario, Argentina
    Posts
    104

    Thumbs up Re: Open user's home page from desktop application without login screen

    Egg... i wasted 9hs of my life trying to solve my issue, and then you write 3 lines and solves it...
    Man, i can't stop loving you
    Thanks a lot!!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Visualizzare tutte le opportunitā in home page
    By d.perencin in forum Italiano
    Replies: 0
    Last Post: 2006-06-19, 07:57 AM
  2. changing the theme for the login screen
    By gekido in forum Help
    Replies: 1
    Last Post: 2005-08-13, 11:39 PM
  3. Modifying the login page.
    By wyred in forum Developer Help
    Replies: 0
    Last Post: 2005-07-05, 09:43 AM
  4. 3.0 Portal Home (default page) Configuration
    By gatezone in forum General Discussion
    Replies: 3
    Last Post: 2005-06-16, 11:36 PM
  5. Changing default calendar view in Home Page
    By smueller72 in forum Feature Requests
    Replies: 5
    Last Post: 2005-03-03, 04:36 PM

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
  •