close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

login fail

Thread begun 2/14/2017 8:01 am by Jamie | Last modified 2/22/2017 10:03 am by Ray Borduin | 2969 views | 13 replies |

Jamie

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

Sign in to reply to this post

Ray BorduinWebAssist

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.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

ok cool thanks

Sign in to reply to this post

Jamie

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

Sign in to reply to this post

Ray BorduinWebAssist

Can I get a url, username/password, and ftp access? I'll have to view the code in context to debug it.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

ok here you go

Sign in to reply to this post

Ray BorduinWebAssist

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 ?>

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

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

Sign in to reply to this post

Ray BorduinWebAssist

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

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

Sorry, I don't follow

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...