You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was running into the same issue. Looks like the $user variable is being used as a model even though it is just the user ID being passed by the route. The following snippet instantiates a user object and that is used for the rest of the logic.
publicfunction update($user)
{
// Create User Object based on user ID passed via route$user = User::find($user);
if ($user->id != Auth::user()->id) {
return Redirect::to('/')
->with( 'error', 'access forbidden' );
}
when updating own password via /user
it submits to /user/1/update gives ErrorException - Trying to get property of non-object
User object does not appear to exist at this point ,
Editing users through admin works
The text was updated successfully, but these errors were encountered: