We have three different accounts on our website that members can sign up to but one login page. How can I set it up so when a user logs in they are taken to the correct account based off their user id?
Right now when someone logs in they are automatically redirected to “account one” but if they are an “account two” holder they get a “permission denied message”.
Also have the same problem with the “my profile” link… say account two holder is logged in and they are browsing the site and then they click on the “My Profile” link, they get a “permission denied message”. Can this link be set to read their user id or something so it takes them to the right profile page?
Everything’s working great for an “account one” holder .
Please help… code is below, and thank you.
Login page-
html code:
<td class="field"><input type="submit" value="Login" name="action"/></td>
php code:
//get query data
$inpReturnURL = Footprint::$Request->Input("return", Footprint::URL("account/index.php"));
xml code:
<commands>
<command id="lookup-login">
SELECT
user.id AS user_id,
user.username
FROM
user
WHERE
user.username = '%username%'
AND(
user.password = MD5('%password%')
)
AND(
is_active = 'yes'
)
;
</command>
"My Profile" link-
useing an xsl file that the html page calls on:
<a href="account/index.php">My Profile</a>
thanks