UserinfoProvider.GetuserInfo only accepts ID and username. I'm just curious if theres a way to get user info based on a unique custom attribute.
Quite new to Kentico, so any insight would be appreciated. Thank you!
Hi Erik,
You can check a few query examples here in the documentation.
For your particular case it would be:
var user = UserInfoProvider.GetUsers().WhereEquals("YourCustomAttr", "Value").TopN(1).FirstOrDefault();
Please, sign in to be able to submit a new answer.