-
Notifications
You must be signed in to change notification settings - Fork 257
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
How to validate addtional fields and save part details to another table #490
Comments
I've tried adding a customer validator, which when adding all the fileds to the $user object it all works ok. But as soon as I try and seperate it so one part goes to one table and one to the other, I get password_mismtach error |
I'm having a similar issue, but not quite the same.. My issue is that if I attempt to add any sort of custom fields with custom validation and addition MySQL columns, I can't confirm the user no matter what. Not sure what's going on here, but Confide is not easily customizable I agree. Edit: For your issue, have you tried creating a separate model and using a new instance in the signup() method? (in UserRepository.php) |
I haven't created a new model but I have edited the existing one in signup(). The strange thing is when I am validating using the default $user = new User everything works. But soon as I change that it stops working. e.g I tried creating a new instance of user $user2 = new User and tried to see if I can insert anything into users table manually without validation and it will not work. It's the default $user = new User is stopping me from entering in anything manually |
for example I added this to the model to see if it goes in manually
I still get "The passwords did not match." error. Here I have not asked to validate anything, I'm putting it straight in. I thought the save function at the bottom of UserRepository might interfering with the normal save function, but even removing that made no difference, it is still trying to force validation. I am guessing it is to do with the following piece of code in
why is the validation not being done separately and the save being done separately? This it automatically trying to save and validate it at the same time, whilst overwriting the original save, meaning you can't hook into it and can't use a separate instance to save because it is being overwritten? |
Looks like someone else with a similar issue with save function, messing up doing anything else. Would be nice to clarify how this should be done without modifying vendor package |
I give up, this package is proving to be a pain in the butt to customize. Wish it was more user friendly, all these loops and holes you have to jump through just to add some columns into a different table at the time of validation, you can't intercept the override save function, to determine what should be saved and what needs to transfer across without modifying the vendor files, plus where is the documentation looks like not much exists for anything. |
Hi all,
I'm hoping someone can help as I have been pulling my hair out on this. Whilst this plugin works great out of the box. It seems making any customizations is a chore and half.
All I wanted to do was add some additonal fields, validate them and save one part to the users table and the other address fields to a different table.
I can't find any instruction on how to do this? Can anyone advise with an example?
The text was updated successfully, but these errors were encountered: