Announcement

Collapse
No announcement yet.

breaking a loop with continue;

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • breaking a loop with continue;

    I am using one of those scripts where you absolutely cannot touch the php or it ceases to work. You are provided an external preferences file to do all your changes. As per author, in order to authenticate, I must use a file with the following in there.

    <?php
    if (logon is set) then
    do nothing / continue
    else
    redirect to logon page
    end if
    ?>

    Translate that:
    if user is already authenticated, then keep going, otherwise show him logon page. (The logic must be already authenticated then do)

    In my example below, if user is not authenticated, it brings up the login page just fine. However, if he is, that appears to enter in a loop or display a blank page. It has been only 12 hours I am trying to figure it out.
    Can someone please tell me what is wrong with the continue clause?
    <?php
    chdir('/var/www/forums');
    define('NO_REGISTER_GLOBALS', 1);
    $phrasegroups = array();
    $actiontemplates = array('lostpw' => array('lostpw'));
    require_once('./global.php');
    require_once('./includes/functions_login.php');
    if ($bbuserinfo['userid'])
    {
    continue;
    }
    print_no_permission();
    ?>

  • #2
    I've posted a reply over at vbulletin.org.

    Comment


    • #3
      Thanks, but that does not work.

      Comment


      • #4
        Since this is a modification / addon, you have to take this to vb.org .

        Comment


        • #5
          Sorry. I tought that this was for php code help here too. My mistake.

          Comment


          • #6
            It is, but modifications / addons aren't supported on this forum .

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X