Express Entry, User Selector Attribute, Get Username? (already can getID)

Hey so I’m trying to work against an Express Entry where one of the Attributes is an Express User Selector. A User is expected to be Selected.

I can getID() to get the ID for the user. However I also want to get the username for that user, and I’m unsure of the easiest way to do this, since I’m not sure where in the API documentation to look (search functionality could be better on there).

Can anyone share some recommendations please?

Thanks!

Are you using getID or getUserID

Selected User would be an Attribute of type User (select)

$entry->getSelectedUser()->getID();

Anyone? How do I convert a UserID to a UserName? Like, programmatically…

Try
$entry->getSelectedUser()->getUserName();

Other option. If you’re using the core user selector attribute, it has a public method getPlainTextValue() that outputs the username directly.

1 Like

I’ll try those when I get a chance, thanks!