Skip to content

Commit

Permalink
fix: must be authenticated to call Whoami
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbarletta authored Apr 11, 2018
1 parent d771d68 commit a2b7c41
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,6 @@ function createSuiteCrmNote($data, $parentType, $parentId)
global $sugar_config, $current_user;
//We retrieve the current user in order to get
// all the fields we have to serialize
file_put_contents($_SERVER["DOCUMENT_ROOT"]."/lx.log", PHP_EOL. date_format(date_create(),"Y-m-d H:i:s ") .__FILE__ .":". __LINE__." -- ".print_r($current_user, 1).PHP_EOL, FILE_APPEND);
$userBean = BeanFactory::getBean('Users');
$user=$userBean->retrieve($current_user->id);
$all_fields = $user->column_fields;
Expand Down Expand Up @@ -547,7 +546,7 @@ function createSuiteCrmNote($data, $parentType, $parentId)
//Override User Hash - we don't need it
$module_arr['user']['user_hash']='youShallNotPass';
return $response->withJson($module_arr);
})->setArgument('auth', false);
})->setArgument('auth', true);



Expand Down

0 comments on commit a2b7c41

Please sign in to comment.