Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Username field not created by confide:migration #509

Open
iforwms opened this issue Feb 2, 2015 · 7 comments
Open

Username field not created by confide:migration #509

iforwms opened this issue Feb 2, 2015 · 7 comments
Labels

Comments

@iforwms
Copy link

iforwms commented Feb 2, 2015

I know this is specified in the docs as not being created (It will setup a table containing email, password, remember_token, confirmation_code and confirmed columns, which are the default fields needed for Confide use. Feel free to add more columns to the table later.)

But the sql query checks for username OR email equal to the customer input. As the username column does not exist by default, this throws an error.

@andhikamaheva
Copy link

Hi @iforwms-snippets
I have same problem with you. You can delete or comment

 'username' => $emailOrUsername

line 103 in file vendor/zizaco/confide/src/Confide/EloquentRepository.php

@furey-imagination
Copy link

Same problem.

As EloquentRepository.php is part of the core package files, I've just added username back into the migration file (replacing ->unique() with ->nullable()).

@gdevlugt
Copy link

gdevlugt commented Feb 2, 2015

Hi,

Try using the --username option. This will add the username field to the migration.

php artisan confide:migration --username

Also don't forget to use that same --username option for creating the controller:

php artisan confide:controller --username

One immediate problem that occurs is that the username field isn't a required field, but it should be unique according to the database schema. Thus if on the registration form the username isn't entered and there already is a record stored with an empty username, a QueryException (Integrity constraint violation) is given.

@Zizaco Zizaco added the Bug label Feb 3, 2015
@Zizaco
Copy link
Owner

Zizaco commented Feb 3, 2015

Gonna fix this asap

@tjimenez
Copy link

Same here :(

@Donny5300
Copy link

Status please. Currently setting up my login. Dont want to use the username or atleast have the possibility to choose.

@Donny5300
Copy link

@Zizaco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants