Find an authorId based on first and/or last name Is there a way I can reverse use the User Model to return an authorId based on the first/last name (John Doe)?

Basically, I'm converting the first/last to a readable URI segment (using email addresses as username and I want something more readable than an ID in the URL):

{{ entry.author.firstName|lower ~ '-' ~ entry.author.lastName|lower }}


Returns: john-doe

Then on the listing page, grabbing the URI segment, setting that back to a readable name and spliting to array.

{% set authorName = craft.request.segment(3)|replace({'-':' '})|title|split(' ') %}


Which gives me (the equivalent of):

Array
(
  [0] =&gt; John
  [1] =&gt; Doe
)


I'd like to get the author id to return all the entries from said author. I thought something along the lines of below would work:

{% set author = craft.users.firstName(authorName.0).lastName(authorName.1) %}


With the above, I get the error:


  Object of class Craft\ElementCriteriaModel could not be converted to string


However, if I return {{ authorName.0 }} it returns a string.
Well, I was 1 minute away from solving this, so I'll post my answer.

{% set author = craft.users.firstName(authorName.0).lastName(authorName.1).first() %}


Once the author object is set, you can access the {{ author.id }}.

Allowing me to neatly return author entries:

{% set entries = craft.entries.section('news').authorId(author.id).limit('10') %}