We have a customer community portal in one of our Dev Org (this Dev Org is currently in Spring'19).
As per business logic,
Community logged in User need to query/fetch User's Id from User Object by providing any username.
String user_name = 'email@example.com'; //I have checked this user is present in the Dev Org User u = [SELECT ID FROM User where Username =:user_name LIMIT 1]; //Getting List has no rows for assignment to SObject error though provided proper/existing username
- I drilled down more, I have found Licence type of provided username
- Also I have tried (as
Community logged in User) to fetch User Id for Salesforce/Salesforce Platform/Customer Community Licence type Users. But result is positive for those user who are assigned with Customer Community Licence.
- I have tried (as
Guest Community User) to fetch User Id for Salesforce/Salesforce Platform/Customer Community Licence type Users. YES I am able to fetch records of all types of Users (irrespective of Licence type).
Is this due to Spring'19 release?