Skip to main content
replaced http://stackapps.com/ with https://stackapps.com/
Source Link

For my appmy app, I allow people to "register" themselves on my site by typing in their Stack Overflow (etc) name. Now it does allow you to use your ID if you know it, but I find that typing in usernames is much more user-friendly.

In the back end, if someone enters a name, I do a query to /users?filter=<name> and look at the results. So if you enter my name, "codeka", or "Jon Skeet" or something else which is unique on the site it comes back with a single response and I just use that directly. If you type in something like "John", there's 1,287 users that come back for /users?filter=John.

The problem is that if your name on the site is exactly "John", then you might find that you're way down the list somewhere. Rather than requiring users to page through the list to find themselves, I'd like to have some way to specify that "filter" returns exact matches only. So if you entered /users?filter=John&exact=true (say) then only users whose names are exactly "John" would come back.

That way, I could still display the list as I do, but then I could make it so that exact matches appear at the top.

Does that seem reasonable?

For my app, I allow people to "register" themselves on my site by typing in their Stack Overflow (etc) name. Now it does allow you to use your ID if you know it, but I find that typing in usernames is much more user-friendly.

In the back end, if someone enters a name, I do a query to /users?filter=<name> and look at the results. So if you enter my name, "codeka", or "Jon Skeet" or something else which is unique on the site it comes back with a single response and I just use that directly. If you type in something like "John", there's 1,287 users that come back for /users?filter=John.

The problem is that if your name on the site is exactly "John", then you might find that you're way down the list somewhere. Rather than requiring users to page through the list to find themselves, I'd like to have some way to specify that "filter" returns exact matches only. So if you entered /users?filter=John&exact=true (say) then only users whose names are exactly "John" would come back.

That way, I could still display the list as I do, but then I could make it so that exact matches appear at the top.

Does that seem reasonable?

For my app, I allow people to "register" themselves on my site by typing in their Stack Overflow (etc) name. Now it does allow you to use your ID if you know it, but I find that typing in usernames is much more user-friendly.

In the back end, if someone enters a name, I do a query to /users?filter=<name> and look at the results. So if you enter my name, "codeka", or "Jon Skeet" or something else which is unique on the site it comes back with a single response and I just use that directly. If you type in something like "John", there's 1,287 users that come back for /users?filter=John.

The problem is that if your name on the site is exactly "John", then you might find that you're way down the list somewhere. Rather than requiring users to page through the list to find themselves, I'd like to have some way to specify that "filter" returns exact matches only. So if you entered /users?filter=John&exact=true (say) then only users whose names are exactly "John" would come back.

That way, I could still display the list as I do, but then I could make it so that exact matches appear at the top.

Does that seem reasonable?

edited body
Source Link
codeka
  • 536
  • 3
  • 10

For my app, I allow people to "register" themselves on my site by typing in their Stack Overflow (etc) name. Now it does allow you to use your ID if you know it, but I find that typing in usernames is much more user-friendly.

In the back end, if someone enters a name, I do a query to /users?filter=<name> and look at the results. So if you enter my name, "codeka", or "Jon Skeet" or something else which is unique on the site it comes back with a single response and I just use that directly. If you type in something like "John", there's 1,287 users that come back for /users?filter=John.

The problem is that if your name on the site is exactly "John", then you might find that you're way down the list somewhere. Rather than requiring users to page through the list to find themselves, I'd like to have some way to specify that "filter" returns exact matches only. So if you entered "/users?filter=John&exact=true`/users?filter=John&exact=true (say) then only users whose names are exactly "John" would come back.

That way, I could still display the list as I do, but then I could make it so that exact matches appear at the top.

Does that seem reasonable?

For my app, I allow people to "register" themselves on my site by typing in their Stack Overflow (etc) name. Now it does allow you to use your ID if you know it, but I find that typing in usernames is much more user-friendly.

In the back end, if someone enters a name, I do a query to /users?filter=<name> and look at the results. So if you enter my name, "codeka", or "Jon Skeet" or something else which is unique on the site it comes back with a single response and I just use that directly. If you type in something like "John", there's 1,287 users that come back for /users?filter=John.

The problem is that if your name on the site is exactly "John", then you might find that you're way down the list somewhere. Rather than requiring users to page through the list to find themselves, I'd like to have some way to specify that "filter" returns exact matches only. So if you entered "/users?filter=John&exact=true` (say) then only users whose names are exactly "John" would come back.

That way, I could still display the list as I do, but then I could make it so that exact matches appear at the top.

Does that seem reasonable?

For my app, I allow people to "register" themselves on my site by typing in their Stack Overflow (etc) name. Now it does allow you to use your ID if you know it, but I find that typing in usernames is much more user-friendly.

In the back end, if someone enters a name, I do a query to /users?filter=<name> and look at the results. So if you enter my name, "codeka", or "Jon Skeet" or something else which is unique on the site it comes back with a single response and I just use that directly. If you type in something like "John", there's 1,287 users that come back for /users?filter=John.

The problem is that if your name on the site is exactly "John", then you might find that you're way down the list somewhere. Rather than requiring users to page through the list to find themselves, I'd like to have some way to specify that "filter" returns exact matches only. So if you entered /users?filter=John&exact=true (say) then only users whose names are exactly "John" would come back.

That way, I could still display the list as I do, but then I could make it so that exact matches appear at the top.

Does that seem reasonable?

Source Link
codeka
  • 536
  • 3
  • 10

Finding a user given their (exact) display name

For my app, I allow people to "register" themselves on my site by typing in their Stack Overflow (etc) name. Now it does allow you to use your ID if you know it, but I find that typing in usernames is much more user-friendly.

In the back end, if someone enters a name, I do a query to /users?filter=<name> and look at the results. So if you enter my name, "codeka", or "Jon Skeet" or something else which is unique on the site it comes back with a single response and I just use that directly. If you type in something like "John", there's 1,287 users that come back for /users?filter=John.

The problem is that if your name on the site is exactly "John", then you might find that you're way down the list somewhere. Rather than requiring users to page through the list to find themselves, I'd like to have some way to specify that "filter" returns exact matches only. So if you entered "/users?filter=John&exact=true` (say) then only users whose names are exactly "John" would come back.

That way, I could still display the list as I do, but then I could make it so that exact matches appear at the top.

Does that seem reasonable?