close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Rule does not work

Thread began 10/09/2009 6:42 pm by Cologne | Last modified 10/14/2009 10:15 am by Ray Borduin | 2753 views | 15 replies |

Cologne

Rule does not work

Hi,

what does not work here?

<?php

function WA_Auth_GetComparisonsForRule($ruleName){
$comparisons = array();

switch ($ruleName){
case "hgAdmin":
$comparisons[0] = array(FALSE, "".((isset($_SESSION['memberID']))?$_SESSION['memberID']:"") ."", 4, "0");
$comparisons[1] = array(TRUE, "".((isset($_SESSION['level']))?$_SESSION['level']:"") ."", 1, "9");
$comparisons[2] = array(FALSE, "".mktime() ."", 5, "".((isset($_SESSION['logoutTime']))?$_SESSION['logoutTime']:"") ."");
break;
}
return $comparisons;
}


function WA_Auth_GetGroup($groupName){
$group = Array();

switch($groupName){

}

return $group;
}

?>




This ist the logoutTime:

<?php
if (!session_id()) session_start();
if (isset($_POST["buttonLogin"])) {
$_SESSION["logoutTime"] = "".mktime(date("H"),date("i")+5,date("s"),date("m"), date("d"),date("Y")) ."";
}
?>



The page does not redirect when mktime is over logoutTime :-(((

Sign in to reply to this post

Cologne

HEY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



Its not working cause its on the 3 PLACE! whats that? If I put it on first position the page is close and the user is redirect!



HELLO!!!!!


FIX THAT PROBLEM!!!!!!!!!

Sign in to reply to this post

Cologne

  Corrected an issue that caused access rules with multiple conditions to completely fail as soon as the first condition was not met. Additional conditions will now process after an earlier condition fails.  



I use 1.1.8

Thing works!

I got 3 conditions...and the 3rd wont WORK, cause the 1st two work well! If I put the last in 1st position it works.

BUT CAN I BE SURE THE LAST TWO WORK WELL?

I cant sleep if I dont know that my CONDITIONS REALLY works.


PLEASE!

Sign in to reply to this post

Cologne

I think NO ONE is interessted in taht stuff!

If I do something wrong let me know!

Sign in to reply to this post

Eric Mittman

It seems that you are having an issue getting your access rules to work correct? Please explain a little about the conditions of the rule, why you are setting them this way and what the result is when they are applied. The information that you have supplied is a little out of context and I will need some more of the details to help determine what is going wrong and why.

Sign in to reply to this post

Cologne

???

1. check if memberID is bigger 0
2. check if level is 9
3. check if the time is OVER then logout.

this way, ther is no outomatic LOGOUT when the time is over.
when the third is the first it works, so i think, there is something worng witht he extension.

what more do you need to know? the thing is, if the logouttime thing is in 3 position it does not work.

if its on first position it logs out after mktime is bigger than logoutTime.

just try.

Sign in to reply to this post

Cologne

Here is something to CHECK:

login.php

login2.php

both

test@test.de / test

look what happens, when reload the page after TIME is UP, thats not good quality!

Sign in to reply to this post

Ray BorduinWebAssist

Are you using "allow if" or "restrict if" when stacking your rules.

If you use "allow if" it will allow the user in as soon as they meet one requirement. If you use "restrict if" it will reject the user as soon as it fails one requirement.

My guess is that you have not applied it with that in mind and you expect that all three conditions would have to be met. You should probably be using:

"restrict if" member ID is less than 0
"restrict if" level does not equal 9
"restrict if" the time is over

is that what you have done?

Sign in to reply to this post

Cologne

1st.

allow if
allow if
restrict if

2nd.
restrict if
allow if
allow if


This is funny, you say i need to check the order? write it down in the manual, if so!

I thin, allow if, go to next, allow if, ok, go to next, restrict if, ok, go to next, allow if, FAILS, go LOGOUT!

if, not so, WRITE it in the MANUAL, that the rules directly BREAK if 1 thing allow if is OK.

stupid!

Sign in to reply to this post

Ray BorduinWebAssist

I'm actually not stupid... conservatively average intelligence. You don't have to change the order, you have to change the reaction to the conditions and how the conditions are termed (and possibly your tone).

you should use all "restrict if" in your case. Since "allow if" will "allow if" that line passes. It won't break, it will just do exactly what it says it will do and allow the user in if the condition passes. Your mistake (and possibly our documentation team's) is to think that all of the conditions are evaluated as a group, when really it goes line by line.

I'll suggest to our documentation team that this was not clear... Thank you for the not so elegant suggestion.

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