Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #10091 - login parameter failing #10098

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions service/core/REST/SugarRestJSON.php
Expand Up @@ -91,6 +91,9 @@ function serve(){
$json = getJSONObj();
$data = $json->decode($json_data);
if(!is_array($data))$data = array($data);
if (!isset($data['application_name']) && isset($data['application'])){
$data['application_name'] = $data['application'];
}
$res = call_user_func_array(array( $this->implementation, $method),$data);
$GLOBALS['log']->info('End: SugarRestJSON->serve');
return $res;
Expand Down
8 changes: 6 additions & 2 deletions service/v4/SugarWebServiceImplv4.php
Expand Up @@ -70,9 +70,13 @@ public function __construct()
* - user_default_team_id, user_is_admin, user_default_dateformat, user_default_timeformat
* @exception 'SoapFault' -- The SOAP error, if any
*/
public function login($user_auth, $application = null, $name_value_list = array())
public function login($user_auth, $application = null, $name_value_list = array(), ...$args)
{
$GLOBALS['log']->info("Begin: SugarWebServiceImpl->login({$user_auth['user_name']}, $application, ". print_r($name_value_list, true) .")");
$application_name = $args['application_name'] ?? '';
if ($application_name === '' && $application === null){
$GLOBALS['log']->info("Application name not set. Please set using 'application_name' or 'application'. ");
}
$GLOBALS['log']->info("Begin: SugarWebServiceImpl->login({$user_auth['user_name']}, $application_name, ". print_r($name_value_list, true) .")");
global $sugar_config, $system_config;
$error = new SoapError();
$user = BeanFactory::newBean('Users');
Expand Down