Closed ghost closed 10 years ago
This fixed the issue!
I think the best solution is to add a config "optional_username" and check in getUserByIdentity
@Doublemedia spotted another username field not exists issue in getUserByEmailOrUsername
Do you have any suggestions to solve the issue that it will overwrite the edited files that arent in the package username-optional package, when i will run an composer update.
@Doublemedia
You can follow this https://getcomposer.org/doc/05-repositories.md#vcs to use my fork.
Interesting. What i don't understand yet is do i update the main composer.js in the root or the vendor composer file.
If it's the project composer file how do i edit it?
{ "repositories": [ { "type": "vcs", "url": "https://github.com/igorw/monolog" } ], "require": { "monolog/monolog": "dev-bugfix" } }
Do i remove the confide require or ..?
change url to https://github.com/wppd/confide
require "zizaco/confide": "dev-fix-checking-username-field"
Up and running! Thx for the help.
Was this merged in? Why was the branch deleted?
@Zizaco this is a pr related to the issue that @Doublemedia mentioned in #402
I reproduce the problem on a brand-new installation.
In the
validateIsUnique
, theusername
field will be set to empty when username is optional.Then it'll call
EloquentRepository->getUserByIdentity
, which will generate query something like this.User::where('username','=','')->get();
And laravel will still look up the field
username
which doesn't exist so it cause the error.