-
Notifications
You must be signed in to change notification settings - Fork 608
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
SQL error on user information update #63
Comments
The username field is in the form. What url are you getting this at? Both admin/users/create and users/create are working for me. |
Apologies Andrew, I think I've thrown you off course here, it's not the create routes it's the profile update/user index routes (e.g. www.example.com/user). Try submitting this form? It has no username field and it also submits to postIndex() which seems quite tailored for the create submission (which is why i was wondering if there should be a postCreate() or postIndex() is supposed to handle user registration and user updates. |
Ah, got it. I thought I had removed that page. I'll patch it up. |
Great work, will have a look at this now. Just to let you know you have a duplicate form close tag in / app / views / site / user / index.blade.php |
And ln57 of UserController.php should be
not
|
This still redirects to user.login even when the user is updating their details? They're already logged in so should probably direct to their profile page or something? |
Also, the update form only updates if the user enters their password/confirm password, that's probably not desired behaviour is it? They shouldn't have to do that if they're already logged in. If they don't enter their password, they updates don't take effect but you still get the message 'user account updated'. (sorry for all the comments, should I raise new issues?) |
There is also an error on submission of the user/create form (using {{ Confide::makeSignupForm()->render() }} to generate the form) The error is: Missing argument 1 for UserController::postIndex() Because that function is now expecting a User object? I think the function still has dual purposes (probably by design) of handling user creation and user updates but isn't quite handling both (either) at the moment. |
Any thoughts? |
I see you've been doing fixes.... that relate to this also 👍 |
Yeah I'll have this updated shortly when I merge the phpunit test branch. |
If you submit the form at user/create you get an error about the username column not being in the SQL (because it's not in the form).
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'username' cannot be null (SQL: insert into
users
(username
,email
,password
,confirmation_code
,updated_at
,created_at
)If you add the username in to the form and submit it, there is no error but if you change the email address of the user (which should be a valid action?) it creates a new record in the database rather than updating the user details with the new email address.
The text was updated successfully, but these errors were encountered: