Use the API to find a username based on an email?

I don’t follow :frowning:

The API I linked to works by filtering (which I didn’t know what possible) the list of active users by their email. Not sure how I’d trigger this in thew web UI.

function getUsernameByEmail($email)
{
    $users = $this->_getRequest("/admin/users/list/active.json?filter=".urlencode($email));
    foreach($users->apiresult as $user) {
        if($user->email === $email) {
            return $user->username;
        }
    }
    return false;
}

BTW, let me clarify something in my previous response: I did get the API I linked to to work just fine. I just had trouble with other forks of it.

One thing I’d like to update during SSO is the user’s website field. I tried changing it in the admin to see what happens in the Network tab, but I don’t understand what I’m looking for. (AFAICT, I can’t add the website to the SSO payload, but I should be able to add another step that changes the website right before submitting the payload.)