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);
}
Bookmarks