[pmwiki-users] AuthUser problem - lines order in local config
OBUTEX / Hladůvka
admin at obutex.com
Mon Mar 13 10:07:57 CST 2006
I have problems to log in as an other user with his password (other then
administrator).
I can log in as an other defined user with admin's password but then
there are admin's rights for that user;
in Site.AuthUser the other user is defined as a member of different
@groups and it works fine.
As soon as I want to use the user's password then the match is not
found. :-(
As I tried all possible variants (with Site.AuthUser file only, with
.htpasswd file etc)
and still don't know where is the mistake , I think there is problem in
local config lines order.
In the last try I removed the (:encrypt ... :) markups from
Site.AuthUser and started
using local/.htpasswd cookbook/htpasswdform.php as I suspected
the hosting server that it changes code pages according to my browser
national settings
(might it be possible? but there are no special chars in username nor
passwords).
Would someone check the parts of my local config?
Is the text blocks order A, B, ... ,G correct ?
Any advice will be appretiated.
Jiri
---------
#=A=
$Conditions['member'] = '@$GLOBALS["AuthList"][$condparm] > 0';
#=B=
## DefaultPasswords
$DefaultPasswords['read'] = array(crypt('somepwd'), 'id:*');
$DefaultPasswords['attr'] = crypt('somepwd1);
$DefaultPasswords['edit'] = crypt('somepwd1');
#=C=
# ------------------------------------------
## Define usernames and passwords.
$Authuser['Jiri'] = crypt('somepwd1');
#=D=
$AuthUser['htpasswd'] = 'local/.htpasswd'; # A passwd-formatted file
$AuthUserHtPasswd = 'local/.htpasswd'; # A passwd-formatted file
#=F=
include_once("cookbook/htpasswdform.php");
#=G=
## Enable authentication based on username.
include_once('scripts/authuser.php');
#=E=
## Let Author = AuthId
if (@$AuthId) $Author = $AuthId;
#=F= IS THIS STILL NECESSARY ??
##adds action=logout
global $HandleActions;
SDV($HandleActions['logout'], 'HandleLogout');
function HandleLogout($pagename) {
session_start();
session_unset();
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time() - 42000, '/');
}
if (isset($_COOKIE['author'])) {
setcookie('author', '', time() - 42000, '/');
}
session_destroy();
Redirect('Main.HomePage');
}
#=G=
## ... and PmWiki.PasswordsAdmin.
$DefaultPasswords['admin'] = crypt('somepwd1');
--
OBUTEX s.r.o
Ing.Jiří Hladůvka
Zlatovská 22
911 01 Trenčín
tel.: +421 (0)32 6587000
mailto:admin at obutex.com
http://www.obutex.com
More information about the pmwiki-users
mailing list