login fail
Hey Ray
On the attached login page, how would I also add a check against the column UserActive (also in the pcms2_users table) and if it is set to 0 then login fails and triggers the error message on line 91 please?
Cheers
Hey Ray
On the attached login page, how would I also add a check against the column UserActive (also in the pcms2_users table) and if it is set to 0 then login fails and triggers the error message on line 91 please?
Cheers
Probably the best answer is to add the UserActive column to the list of stored session values. Then you can create another rule for "Logged In but not Active" that looks for the value of that session variable.
Then on each of the restricted pages you could add a check to see if someone is logged in and not active and redirect them back to the login page with failed=3 in the url.
ok, have done all that and if UserActive=1 they are able to log in fine, but if UserActive=0 it redirects to this uri
http://clients.motley.site/domain/members.php?accesscheck=%2Fdomain%2Fmember-loggedin.php%3F
as a result the page is erroring....have attached the rules, login page and the logged in page. Not sure what I have done wrong
Can I get a url, username/password, and ftp access? I'll have to view the code in context to debug it.
Your members.php page has a redirect if the user is logged in that is causing an infinite loop.
line 40 should probably be:
<?php if(WA_Auth_RulePasses("Members Only") && WA_Auth_RulePasses("Logged In But Not Active")){ // Begin Show Region ?>
thats brilliant and got that working - thanks
now if a user is not active, the redirect url should include ?failed=3 but its showing ?failed=1
Try setting the form action to just members.php and then add a fail redirect to the authentication server behavior instead: members.php?failed=1
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.