|
Cookbook /
Auth-SMF-TalkTalk and Questions about Auth-SMF Leave latest contribution at the top please!To everyone who has problems with SMF redirecting to PmWiki on login/logoff, here's how I solved it. Fixing logoff
Fixing login
// The main sub template above the content.
function template_main_above()
{
// Begin of PmWiki login redirect fix
if (isset($_SESSION['login_url'])) {
if (!isset($_GET['action'])) {
unset($_SESSION['login_url']);
}
elseif ($_GET['action'] != 'login') {
unset($_SESSION['login_url']);
}
}
// End of fix
Hi, I installed the software as per your instructions above and apart from making the same error as Matthias it now all works almost perfectly. The only proviso is:
I have the following in my Page Top Menu:
(:if equal {$AuthId} guest:)
* Welcome guest | [[{*$FullName}?action=login | Log In]]
(:if ! equal {$AuthId} guest:)
* [[{*$FullName}?action=logout | Log Out {$AuthId}]]
* %rel=nofollow accesskey=$[ak_edit]%[[{*$FullName}?action=edit | $[Edit] ]]
Is there a 'fix' for this such that I can in each case actually stay on the same page as I was before I hit the log-in / log-out button. Hi, I have the same problem. It's very good recipe, but I can't use it, because i see the smf main page after login. netDalek@gmail.com Hi, I have having the same issue as Matthias except I do not have duplicate DefaultPassword('admin') entries. SMF works fine, but I cannot edit the wiki. I am thrown back to SMF after login. It must be a simple error on my part, but I cannot figure it out. Any ideas? JohnPayne -- sycarion@gmail.com Use markup Hello Hans, I installed everything and it nearly worked. So I can display the post, topics, new and so on from smf on my page, but if I include the entries you mention in my local config.php I can't edit my wiki anymore. There is a prompt for user and password and I couldn't manage to get in, until I delete the smf entries in my local config.php. Is this maybe a bug? Thanks --MatthiasGünther Have you set edit permissions for the wiki? Add to config.php: $DefaultPasswords['admin'] = '@admin';
$DefaultPasswords['edit'] = '@editor';
For testing, put into a wiki page *AuthId: {$AuthId}
*Author: {$Author}
*{$UserName}: {$UserEmail}
Hello Hans, the {$Author}and {$UserName}: {$UserEmail} are correct but the {$AuthId} show the same entry as {$Author} --MatthiasGünther
That will be the case if in SMF your login name is the same as your "real name". Are the default passwords set after including auth-smf.php? -HansB Hello Hans, yes I insert them after including auth-smf.php. Nevertheless if I change $DefaultPasswords['edit'] = '@editor'; to $DefaultPasswords['edit'] = 'bla'; the output is the same. --MatthiasGünther
Hello Hans, now it works. I had annother DefaultPasswords['admin'] in my config.php, such a stupid mistake :). Thanks for your help --MatthiasGünther
|