Auto Redirect

st3fan asked 5 years ago
The auto redirect for a member towards profile#subscriptions is most likely breaking direct linking of certain pages.   Whenever I go to /profile it will redirect me to profile#subscriptions directly unless I typ /profile#profile.   /profile#profile does work, when this is added to the URL it will go towards this page, but the following urls dont work directly:

profile#profile_addresses
profile#reset_password
profile#notification_preferences

It could have something to do with the auto redirect, or nothing at all.
2 Answers
laraship Staff answered 5 years ago
Hello, This is Subscription Module forces the subscription tab to be active, I think it makes sense to make it your way, we will reach our dev team about it
laraship Staff answered 5 years ago
Hello under  Corals/core/User/Http/Controllers/ProfileController.php index function 
$active_tab = 'profile';
$active_tab = \Filters::do_filter('active_profile_tab', $active_tab, user());
return view('auth.profile')->with(compact('active_tab'));
  you will in subscription service provider :
\Filters::add_filter('active_profile_tab', [Subscription::class, 'set_subscription_active_tab'], 10);
 
public function set_subscription_active_tab($tab, $user)
{
if ($user->hasPermissionTo('Subscriptions::subscriptions.subscribe')) {
$tab = 'subscriptions';
}
return $tab;
}