Login Redirect | phpVMS

Hello Peeps.

I am working on a new Crew Center. I have renamed the Profile Module as Dashboard. My frontpage_main.php looks like this

 

\<?php if(!defined('IN\_PHPVMS') && IN\_PHPVMS !== true) { die(); } ?\> \<?php if(Auth::LoggedIn()) { header('Location:'.SITE\_URL.'/dashboard'); } else { header('Location:'.SITE\_URL.'/login'); } ?\>

 

Now after I log in it still redirects me to Profile Module. I want it to be redirected to Dashboard Module as http://crew.siteurl.com/dashboard. I tried to dig deeper but was afraid to mess up. So any leads or fixes folks?

Sincerely,

Aaryan Kapoor

In the login form there is a hidden field which includes the directory where you want to redirect someone who logs into your system. Open lib/skins/your_skin/login_form.php or core/templates/login_form.php and there should be a field like this:

\<input type="hidden" name="redir" value="index.php/profile" /\>

replace “index.php/profile” to "index.php/dashboard and it should work the way you want.

1 Like

Well Thanks Dude! That Did it. Working like a charm. The answer was in front and I was searching here and there.