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

Password field is ignored when creating #128

Closed
alexgmin opened this issue Sep 22, 2016 · 4 comments
Closed

Password field is ignored when creating #128

alexgmin opened this issue Sep 22, 2016 · 4 comments
Labels

Comments

@alexgmin
Copy link

The storeCrud method ignores the password field.
$item = $this->crud->create($request->except(['redirect_after_save', 'password', '_token']));

This doesn't happen on the updateCrud method.
$this->crud->update($request->get($this->crud->model->getKeyName()), $request->except('redirect_after_save', '_token'));

On a basic user crud like this one:

[
    'name' =>'name',
],
[
    'name' =>'password',
    'type' => 'password',
],
[
    'name' =>'email',
    'type' => 'email'
],

You cannot create a password for a new user, but you can update the password of an existing user.

@tabacitu
Copy link
Member

Hmm... you're right...

@mariusconstantin2503 - do you remember what the purpose of that is?
@OwenMelbz - you've recently been there. Your 2 cents? you think removing that from CRUD will break anything other than PermissionManager?

Thanks!

@tabacitu tabacitu added the Bug label Sep 25, 2016
@OwenMelbz
Copy link
Contributor

@tabacitu I cant see a clear cut reason for it being there, unless it was to prevent accidental plain text passwords being saved? or incase there was something within the Register method for new users that sign up from the register webpage?

@tabacitu
Copy link
Member

Hi @alexgmin ,

It's now fixed, you can the 'password' input like any others. Of course, for passwords you should probably have a mutator in your model to bcrypt() it.

Cheers!

This was referenced Apr 2, 2020
@GregaUNK
Copy link

GregaUNK commented Jan 27, 2025

@tabacitu , I am still having issues with that. When I create a new user and set its password, it's not working. I have to enter it again and resave it. Then it's working. What could be wrong? I have the latest Backpack Crud Pro.

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

4 participants