-
Notifications
You must be signed in to change notification settings - Fork 258
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
Serialization of 'Closure' is not allowed #522
Comments
did you ever find a solution to this problem? |
Do $user->toArray() or something, but don't try to serialise the entire user object - that won't work. |
It doesn't work because you end up trying to serialise the entire laravel service container and all resolved objects, lol. |
I'm just calling the password reset method.. will give you more details when I'm in front of a computer. |
@GrahamCampbell I'm only calling |
I think this happens because A workaround would be easy, I just replace the IoC with protected function sendEmail($user, $token)
{
$config = $this->app['config'];
$this->app['mailer']->queueOn(
$config->get('confide::email_queue'),
$config->get('confide::email_reset_password'),
compact('user', 'token'),
function ($message) use ($user, $token) {
$message
->to($user->email, $user->username)
->subject(Lang::get('confide::confide.email.password_reset.subject'));
}
);
} Compare to: https://github.com/Zizaco/confide/blob/master/src/Confide/EloquentPasswordService.php#L169-L184 |
When i submit the forgot password form i getting the "Serialization of 'Closure' is not allowed" Exceptio
after debugging i find the code from there error is reproduced
// File : confide/src/Confide/EloquentPasswordService.php
// Code:
protected function sendEmail($user, $token)
{
$config = $this->app['config'];
$lang = $this->app['translator'];
The text was updated successfully, but these errors were encountered: