Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I figured this out a long time ago, but I never got around to answering the question. So heres what I did</p> <pre><code> $WebAuth_find = $FILMAKER-&gt;newFindCommand('WebAccess'); $Search_findCriterions = array('Access::cntdPhoneNumberDisplayCalc'=&gt;"==".$find,'Access::phoneType'=&gt;"E-mail",'Access::phoneMain'=&gt;"==1",'LoginAccess'=&gt;'1'); foreach($Search_findCriterions as $key=&gt;$value) { $WebAuth_find-&gt;AddFindCriterion($key,$value); } $WebAuth_Result = $WebAuth_find-&gt;execute(); if (FileMaker::isError($WebAuth_Result) &amp;&amp; $WebAuth_Result-&gt;code == 401) { echo "FM ERROR CODE: ".$WebAuth_Result-&gt;code."&lt;br&gt;"."ERROR: ".$WebAuth_Result-&gt;getMessage(); </code></pre> <p>This identifies the current user in the Filemaker database under the WebAccess layout. It throws an error message if there is a problem. Now that I am looking at the current user I have it look to see what is in the Comm Plus and PDQ fields in the database, and create a session to hold the information.</p> <pre><code>else{ $FinalResult = current($WebAuth_Result-&gt;getRecords()); $_SESSION['district']= $district; $PDQ = $FinalResult-&gt;getField('PDQ_subscription'); $_SESSION['PDQ'] = $PDQ; $CommPlus = $FinalResult-&gt;getField('CommPlus_subscription'); $_SESSION['CommPlus'] = $CommPlus; </code></pre> <p>Then I just add the following code to the top of whatever page I want to restrict access to. It looks at the session to see if the current user has credentials if not they are directed to the access denied page.</p> <pre><code>$PDQ_check = $_SESSION['PDQ']; if (!isset($PDQ_check) || $PDQ_check == '' || $PDQ_check == '0'){ drupal_goto("access-denied"); exit(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload