Fork me on GitHub

Login issue with PNphpBB2  Bottom

Go to page 1 - 2 [+1]:

  • Is there a patch to solve the login issue of pnphpbb2 with zikula?
    When I try to access to a topic as "unregistered" pnphpbb2 ask me for the password, this is goog, but when I write it, nothing happen! I'm redirected on the zikula login page always as an unregistered user :(
    Someone solved or pathced this issued?
    Have I to modify something in the "login.php" of the pnphpbb2 module?
  • When you try to post or read a topic as unregistered?

    Permissions may play a role here. Hvae you modified them for PNphpbb2?
  • I leaved the same permission rules that worked in postnuke, I don't want unregistered user can read/write the forum.

    But the problem is another, when I try to login with the pnphpbb2 "login mask" it doesn't work.
    I can login only with the zikula login module

    Nobody have this issue?
    Everybody can login in zikula with the pnphpbb2 login page?
  • To be honest, I don't think I've ever tried to login through the module.
  • Known bug, thanks to reminding me to go back to work this weekend. icon_wink
    Greetings,
    Chris

    --
    an operating system must operate
    development is life
    my repo
  • Here's how I fixed this for myself...

    PNphpBB2/login.php
    Edit lines 261-267

    Code

    // Begin PNphpBB2 Module
            $s_hidden_fields .= '<input type="hidden" name="url" value="' . $module . '">';
            $s_hidden_fields = '<input type="hidden" name="authid" value="' . pnSecGenAuthKey('Users') . '">';
            $s_hidden_fields .= '<input type="hidden" name="module" value="Users">';
            $s_hidden_fields .= '<input type="hidden" name="op" value="login">';
    // End PNphpBB2 Module


    PNphpBB2/templates/PNTheme/login_body.tpl
    Edit line 1

    Code

    <form action="index.php?module=Users&amp;func=login" method="post">
  • Patches are always most welcome - thanks! Bug closed.
    Greetings,
    Chris



    edited by: slam, Jan 09, 2009 - 11:25 AM

    --
    an operating system must operate
    development is life
    my repo
  • Great job, but the ticket is far to be closed.
    With this patch the pnphpbb2 module makes the login, but it redirects in the zikula home page :(

    Ex:
    In postnuke: click on the "registered-user-only" forum => pnphpbb2 module ask for the password => I see the forum I clicked
    In zikula (with this patch): click on the "registered-user-only" forum => pnphpbb2 module ask for the password => I see the zikula hom page

    Have I to open a new ticket o it's the same?
  • Code

    $s_hidden_fields .= '<input type="hidden" name="url" value="' . $module . '">';

    This "should" redirect you back to the current module, that being PNphpBB2...
    Could you look at the HTML source, and see what it says? If it shows the value blank (value="") then the module variable isn't being set. If it shows PNphpBB2, then there may be a browser issue with redirection.


    Also, this didn't include index_body.tpl as a fixed login. I couldn't directly add the PHP for the authid, so I added it to the defined list in includes/page_header.php
    Line 690

    Code

    'USERS_MODULE_AUTHID' => pnSecGenAuthKey('Users'),


    and then of course
    templates/PNTheme/index_body.tpl
    Lines 110-124

    Code

    <form action="index.php?module=Users&amp;func=login" method="post" >
    <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
    <tr>
    <td class="cat">{L_LOGIN_LOGOUT}</td>
    </tr>
    <tr>
    <td class="row1 gensmall" align="center">{L_USERNAME}:
    <input type="text" name="uname" size="10" maxlength="25">
    &nbsp;&nbsp;&nbsp;{L_PASSWORD}:
    <input type="password" name="pass" size="10" maxlength="32">
    <input type="hidden" name="url" value="index.php?name={T_MODNAME}">
    <input type="hidden" name="module" value="Users">
    <input type="hidden" name="authid" value="{USERS_MODULE_AUTHID}">
    <input type="hidden" name="op" value="login">
    <input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />




    edited by: billthecat, Jan 10, 2009 - 12:46 PM
  • As unregistered I clicked on a protected forum, logina page appears.
    In firefox I select "view source" and in the source code I read:

    input type="hidden" name="URL" value="/new/index.php?name=PNphpBB2&file=login&redirect=viewforum&f=14&start=0" /

    When I click on login, the login works, but I see the home page :(

    The right redirect URL (after logged in) should be:

    http://www.xxxxx.xx/new/index.php?name=PNphpBB2&file=viewforum&f=14

    What's wrong?
    Have I to modify the index.php or not? I didnt' understand



    edited by: lordevol, Jan 11, 2009 - 06:43 AM
  • I also notised , that only admin can post in phpbb2 forum not users.
    do i need to setup special permissions for pnphpbb2 module for users? how?
    or this is a bug and i need manually add users tom pnphpbb2 users database?
    than in advance
  • how can i download dizkus SVN snapshot?
  • Lordeval, I think this has to do with your browser...
    The code you provided seems to come out of 'viewforum.php' at line 128, where the login is checked for permissions. Then at line 176 there's a meta refresh after permission is verified.

    I tried pasting the meta info here, but it seems be blocked by this forum...
  • Put it in code tags [ code ] blah [ / code ]

    without the spaces.
  • I did, and it removed part of it...here's what it shows for me, but look at 176 and you'll see a lot more:

    Code

    'META' => '')

Go to page 1 - 2 [+1]:

This list is based on users active over the last 60 minutes.