PDA

View Full Version : Why redirect to profile?


akstudio348653
03-11-2010, 05:35 PM
Im hacking my way through the reg system, and I got it all into my site just fine, so I thought I would now start to go through the process of being a user and adjust the flow a bit.

I noticed that each page redirects to the profile, so I went ahead and made a "users_Home.php" and would rather have them redirected there instead.

So far so good.

Now, I need to create a few sub-pages off of this "users_Home.php page. So, I open up the protected_Page.php and save it as .. in this example... "watch.php"

I have also gone through the entire sites files, and anything that is protected, I am redirecting to "users_Home.php" using security assist.

My question is.... is this method correct?

The reason I ask is... on the "protected_page" I see this:

if (!WA_Auth_RulePasses("Email Confirmed")){
WA_Auth_RestrictAccess("users_LogIn.php");
}


however, on the profile page, I see this:

if (!WA_Auth_RulePasses("Logged in to users")){
WA_Auth_RestrictAccess("users_LogIn.php");
}

This prebuild site redirects the to profile...

What would be the correct method in which I redirect any and all pages to "users_Home.php - and furthermore.. do I need code example 1 or code example 2 pasted above) on my newly created sub pages?

I dont want them to go to the profile page at all when logging in, that should be a choice off the "users_Home.php page.

Jason Byrnes
03-12-2010, 10:12 AM
you change where the user is redirected on login by editing the Login page.


Find the following line:



and change it to:
[php"successRedirect" => "users_Home.php",


The two rules you posted are used for different things
"Logged in to users" means that the user has successfully logged in with a valid username an password

"Email Confirmed" means the username and password where correct AND they have verified there email address by clicking the link in the email that is sent on initial registration.


the users_Home.php page should only be restricted at the "Logged in to users" level, the rest of your protected pages should be restricted at the "Email Confirmed" level.