-
Notifications
You must be signed in to change notification settings - Fork 259
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
Undefined index: username in vendor/zizaco/confide/src/Zizaco/Confide/Confide.php line 108 #34
Comments
I will take a look at this asap. |
Yes, same here. {{ Confide::makeLoginForm()->render() }} |
To fix this alter this line The array in the UserController assigns only email, password and remember but NOT username. Oh, and please fix the notation "remamber" to "remember", too. You find this also in the UserController. Many thanks for your great work. |
it's something to do with the last 3 commits and the code in Confide.php: Guys I think there's issues with these identity based commits, I'm getting a 500 internal server. Looking at the logs shows: 'Notice: Undefined index: username in /Web/laravel/vendor/zizaco/confide/src/Zizaco/Confide/Confide.php line 108' in /Web/laravel/vendor/zizaco/confide/src/Zizaco/Confide/Confide.php:108 I think the culprit is the following. It's looking for username in the input ($credentials) fields from the login form because you have it in $identity_columns but the username field isn't defined from the input form $identity_columns = array_values($identity_columns);
foreach ($identity_columns as $i => $column) {
echo $column;
if($i == 0)
{
$user_model = $user_model->where($column,'=',$credentials[$column]);
}
else
{
$user_model = $user_model->orWhere($column,'=',$credentials[$column]);
}
} |
See #36 for one way to fix it. |
There's two way to fix it imo:
Since Confide by default has a username I would say use the second. If a developer only wants to allow email login then they can extend the Zizaco/Confide/Confide.php and change the default.
Then it would default to email only. |
Yeah all good thanks, i went for the second option. |
Welcome! |
It seems that he bug is not solved #42 |
I think it is, his controller isn't modified correctly. #43 (comment) |
@andrew13, right. |
I'm getting this error after logging in (I was testing attempting logging in before confirming the account using the link in the email)
ErrorException: Notice: Undefined index: username in vendor/zizaco/confide/src/Zizaco/Confide/Confide.php line 108
The text was updated successfully, but these errors were encountered: