Sorry for the delay. For a url to auto-login to 4.5.1 and go to a module/record if you have the password use:
http://localhost/sugarcrm/index.php
?action=Authenticate&module=Users&user_name=myuser &user_password=mypassword
&login_theme=Sugar&login_language=en_us&login_modu le=Accounts&login_action=DetailView&login_record=0 63adf3a1c-09b1-102a-a884-001143e81ba9
FOLLOWING AT YOUR OWN RISK!
If you need to query the database for the password you'd have to use the user_hash and make a few changes to get that to work:
modules/Users/Authenticate.php:
PHP Code:
$authController->login($_REQUEST['user_name'],(isset( $_REQUEST['user_hash'])? $_REQUEST['user_hash']:$_REQUEST['user_password']));
modules/Users/authentication/SugarAuthenticate/SugarAuthenticateUser.php in function loadUserOnLogin()
PHP Code:
$user_hash = SugarAuthenticate::encodePassword($password);
$user_id = $this->authenticateUser($name, $user_hash);
/** eggsurplus: add this below...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);
}
Then:
http://localhost/sugarcrm/index.php
?action=Authenticate&module=Users&user_name=myuser &user_hash=032945u7-23iasv-asdf9ijmasdff
&login_theme=Sugar&login_language=en_us&login_modu le=Accounts&login_action=DetailView&login_record=0 63adf3a1c-09b1-102a-a884-001143e81ba9
Bookmarks