Results 1 to 10 of 10

Thread: where is authUserStatus()?

  1. #1
    stevel is offline Junior Member
    Join Date
    Jun 2006
    Posts
    1

    Default where is authUserStatus()? Pls HELP...

    I have been trying unsuccessfully for days to locate this function authUserStatus() called from include/utils.php line 2340. Can't seem to find it anywhere. Can anyone point me to which module exactly is this function located? Would like to know what this function really do. I have been getting an undefined function error and unable to proceed because of this.

    Thanks in advance for any help.
    Last edited by stevel; 2006-06-07 at 06:17 PM.

  2. #2
    jeannemeng is offline Member
    Join Date
    Jan 2006
    Posts
    9

    Default Re: where is authUserStatus()?

    Hi,

    I have the same question. Have you found the location?

    Jeanne

  3. #3
    yevi is offline Junior Member
    Join Date
    Jun 2006
    Posts
    3

    Question Re: where is authUserStatus()?

    Quote Originally Posted by jeannemeng
    Hi,

    I have the same question. Have you found the location?

    Jeanne
    I can't find it either. Have you guys found it?

  4. #4
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Red face Re: where is authUserStatus()?

    authUserStatus() is part of the code that insures that the sugarcrm logos stay intact. It is not coded in a way that a text search would find it. Sorry to be so vague but it's hidden for a reason.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  5. #5
    yevi is offline Junior Member
    Join Date
    Jun 2006
    Posts
    3

    Default Re: where is authUserStatus()?

    Quote Originally Posted by kbrill
    authUserStatus() is part of the code that insures that the sugarcrm logos stay intact. It is not coded in a way that a text search would find it. Sorry to be so vague but it's hidden for a reason.
    The reason I asked, is that I'm modifying code to not explicitly authenticate the user, but just trust the REMOTE_USER env var. So I'll comment out all the checks and just return the user object in Users/Authenticate.php.

    Does authUserStatus() need to run?

  6. #6
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: where is authUserStatus()?

    Quote Originally Posted by yevi
    The reason I asked, is that I'm modifying code to not explicitly authenticate the user, but just trust the REMOTE_USER env var. So I'll comment out all the checks and just return the user object in Users/Authenticate.php.

    Does authUserStatus() need to run?
    It does need to run but that shouldn't interfere with a auto login. I wrote one last year that worked without touching the logo cade.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  7. #7
    yevi is offline Junior Member
    Join Date
    Jun 2006
    Posts
    3

    Default Re: where is authUserStatus()?

    Quote Originally Posted by kbrill
    It does need to run but that shouldn't interfere with a auto login. I wrote one last year that worked without touching the logo cade.
    Why is the logo code in the Authentication section? Shouldnt it be in some template header/footer?

    What exactly does this code do?

    Thanks

  8. #8
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: where is authUserStatus()?

    Quote Originally Posted by yevi
    Why is the logo code in the Authentication section? Shouldnt it be in some template header/footer?

    What exactly does this code do?

    Thanks
    It just checks to see if the sugarcrm logos are the same ones distributed with the package. I assume the checks are where they are so they run before the page is rendered, and to make them harder to remove.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  9. #9
    sugarvo is offline Junior Member
    Join Date
    Jun 2007
    Posts
    4

    Default Re: where is authUserStatus()?

    it is encoded in user_utils.php under the

    var
    PHP Code:
    $sam1=...... 
    if you want to see it just run
    PHP Code:
    print_rbase64_decode('$sam1')); 
    of course you'll have to clean up and format the code a little bit

  10. #10
    ivolator's Avatar
    ivolator is offline Sugar Community Member
    Join Date
    Sep 2006
    Location
    Dagobah
    Posts
    98

    Cool Re: where is authUserStatus()?

    At the bottom of this code ;-)

    PHP Code:
    function vcmsi($generate$md5$alt '') {
     
    $generate base64_decode($generate);
     if (
    file_exists($generate) && $handle fopen($generate'rb'true)) {
      
    $from_key fread($handlefilesize($generate));
      if (
    md5($from_key) == $md5 || (!empty ($alt) && md5($from_key) == $alt)) {
       return 
    1;  
      } 
     }   
     return -
    1;
    }
    function 
    acmsi($generate$authkey$i$alt ''$c=false) {
     
    $generate base64_decode($generate);
     
    $authkey base64_decode($authkey);
     if(!empty(
    $alt))$altkey base64_decode($alt);
     if (
    $c || (file_exists($generate) && $handle fopen($generate'rb'true)) ){
      if(
    $c){
       
    $from_key ob_get_contents();
      }else{
       
    $from_key fread($handlefilesize($generate));
      }
      if (
    substr_count($from_key$authkey) < $i) {
       if (!empty (
    $alt) && !empty($altkey) && substr_count($from_key$altkey) >= $i){
        return 
    1;   
       }
       return -
    1;
      } else {
       return 
    1;
      }
     } else {
      return -
    1;
     }
    }
    function 
    amsi($as) {
     global 
    $app_strings;  $z 1;  global $login_error;
     foreach (
    $as as $k) {
      if (!empty (
    $k['m'])) {
       
    $z =minvcmsi($k['g'], $k['m'], $k['a'], $k['l']), $z);
      }else {
       
    $z min(acmsi($k['g'], $k['a'], $k['i'], $k['b'], $k['c'],$k['l']), $z);
      }
     }
     if (
    $z 0) {
      
    $login_error $app_strings["LOGIN_LOGO_ERROR"];  
      
    check_now(true);
     }
    }
    function 
    mymsi($case=false$level=0) {
     global 
    $authLevel;  $authLevel $level;   $fs = array ();
     
    $fs[] = array ( 
     
    'g' => 'aW5jbHVkZS9pbWFnZXMvcG93ZXJlZGJ5X3N1Z2FyY3JtLnBuZw==',//says include/images/poweredby_sugarcrm.png
     
    'm' => 'f3ad3d8f733c7326a8affbdc94a2e707',
     
    'a' => '',
     
    'i' => ,
     
    'c'=>$case,
     
    'l'=>$level
     
    );
     
    $fs[] = array (
     
    'g' => 'aW5kZXgucGhw',//says index.php
     
    'm' => '',
     
    'a' => 'PEEgaHJlZj0naHR0cDovL3d3dy5zdWdhcmNybS5jb20nIHRhcmdldD0nX2JsYW5rJz48aW1nIHN0eWxlPSdtYXJnaW4tdG9wOiAycHgnIGJvcmRlcj0nMCcgd2lkdGg9JzEwNicgaGVpZ2h0PScyMycgc3JjPSdpbmNsdWRlL2ltYWdlcy9wb3dlcmVkYnlfc3VnYXJjcm0ucG5nJyBhbHQ9J1Bvd2VyZWQgQnkgU3VnYXJDUk0nPjwvYT4=',// <A href='http://www.sugarcrm.com' target='_blank'><img style='margin-top: 2px' border='0' width='106' height='23' src='include/images/poweredby_sugarcrm.png' alt='Powered By SugarCRM'></a>
     
    'i' => '1',
     
    'b' => 'PEEgaHJlZj0naHR0cDovL3d3dy5zdWdhcmZvcmdlLm9yZycgdGFyZ2V0PSdfYmxhbmsnPjxpbWcgc3R5bGU9J21hcmdpbi10b3A6IDJweCcgYm9yZGVyPScwJyB3aWR0aD0nMTA2JyBoZWlnaHQ9JzIzJyBzcmM9J2luY2x1ZGUvaW1hZ2VzL3Bvd2VyZWRieV9zdWdhcmNybS5wbmcnIGFsdD0nUG93ZXJlZCBCeSBTdWdhckNSTSc+PC9hPg==',//<A href='http://www.sugarforge.org' target='_blank'><img style='margin-top: 2px' border='0' width='106' height='23' src='include/images/poweredby_sugarcrm.png' alt='Powered By SugarCRM'></a>
     
    'c'=>$case,
     
    'l'=>$level
     
    );
     
    $fs[] = array ( 
     
    'g' => 'aW5kZXgucGhw',//says index.php
     
    'm' => '',
     
    'a' => 'JmNvcHk7IDIwMDQtMjAwNyA8YSBocmVmPSJodHRwOi8vd3d3LnN1Z2FyY3JtLmNvbSIgdGFyZ2V0PSJfYmxhbmsiIGNsYXNzPSJjb3B5UmlnaHRMaW5rIj5TdWdhckNSTSBJbmMuPC9hPiBBbGwgUmlnaHRzIFJlc2VydmVkLg==',//&copy; 2004-2007 <a href="http://www.sugarcrm.com" target="_blank" class="copyRightLink">SugarCRM Inc.</a> All Rights Reserved.
     
    'i' => '1',
     
    'b' => '',
     
    'c'=>$case,
     
    'l'=>$level
     
    );
     
    amsi($fs);
    }
    function 
    getLoginUserStatus(){  mymsi(true1); }
    function 
    authUserStatus(){  mymsi(false2);  } 

Thread Information

Users Browsing this Thread

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

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
  •