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

seed example don't work correctlly #492

Closed
argb opened this issue Jan 11, 2015 · 1 comment
Closed

seed example don't work correctlly #492

argb opened this issue Jan 11, 2015 · 1 comment

Comments

@argb
Copy link

argb commented Jan 11, 2015

password: $2y$10$joqdF9xuW8AnupOw9Eb48.t47782UwR3O34y1oPYMYCRQ1rVBcKWO
password_confirmation: foo_bar_1234

{"password_confirmation":["The passwords did not match."]}

if ($user->password === $user->password_confirmation) {

            // Hashes password and unset password_confirmation field
            $user->password = $hash->make($user->password);
        } else {
            $this->attachErrorMsg(
                $user,
                'confide::confide.alerts.password_confirmation',
                'password_confirmation'
            );
            return false;
        }

hashed and unhashed

$user->getOriginal('password') here,there is no getOriginal in ConfideUser trait.

$user=new User;
$passwrod='dddddd';
$data=array(
"username"=>$this->faker->userName,
"email"=>$this->faker->email,
"password"=>$passwrod,
'password_confirmation'=>$passwrod,
'confirmation_code'=>md5(uniqid(mt_rand(),true))
);
//var_export($data);
$ret=$user->create($data);
//echo $ret;
if(!$ret){
echo $user->errors();
Log::info('Unable to create user '.$user->username,(array)$user->errors());
}else{

        Log::info('Created user "'.$user->username.'" <'.$user->email.'>');
    }

this don't work too, the output:
array (
'username' => 'willow23',
'email' => '[email protected]',
'password' => 'dddddd',
'password_confirmation' => 'dddddd',
'confirmation_code' => 'a78c3a854c3e5a27f804c06701465039',
)
{"username":["The username field is required."],"email":["The email field is required."],"password":["The password field is required."]}

Why so many bugs???!

@argb
Copy link
Author

argb commented Jan 11, 2015

sorry,my faults!

@argb argb closed this as completed Jan 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant