fix: set interact_as_actor for user upon password reset

closes #178
This commit is contained in:
Ola Hneini 2022-08-11 09:32:04 +00:00 committed by Yassine Doghri
parent 10a2ae0248
commit ad8f5f5a0f
1 changed files with 8 additions and 0 deletions

View File

@ -169,6 +169,14 @@ class AuthController extends MythAuthController
$user->force_pass_reset = false;
$users->save($user);
helper('auth');
// set interact_as_actor_id value
$userPodcasts = $user->podcasts;
if ($userPodcasts = $user->podcasts) {
set_interact_as_actor($userPodcasts[0]->actor_id);
}
return redirect()
->route('login')
->with('message', lang('Auth.resetSuccess'));