Skip to content

[5.4] Use custom auth identifier column for "getAuthIdentifier" if set. - #19038

Merged
taylorotwell merged 2 commits into
laravel:5.4from
DFurnes:authenticatable-custom-auth-id
May 3, 2017
Merged

[5.4] Use custom auth identifier column for "getAuthIdentifier" if set.#19038
taylorotwell merged 2 commits into
laravel:5.4from
DFurnes:authenticatable-custom-auth-id

Conversation

@DFurnes

@DFurnes DFurnes commented May 3, 2017

Copy link
Copy Markdown
Contributor

The Authenticatable trait includes methods to get the auth identifier name and value, but the getAuthIdentifier function will always return the primary key even if the column name is overridden.

This pull request updates that function to return the value for a custom auth identifier column, like the retrieveById and retrieveByToken methods in the EloquentUserProvider.

@taylorotwell
taylorotwell merged commit 4ce1926 into laravel:5.4 May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants