CC
Thank you very much. I really need this (and some others most probably
too) and I am really sorry to have taken so long to read my mail and
react.
But I have a few questions after I tried to set this script up.
a) I have inserted a blank user.php file inside the config directory
b)The permission of config folder is rwx (700)
c) I have done steps 3 and 4 of the instructions
Then what is supposed to happen. Is the self registration to occur from
the new user inputing his (her) name and pwd inside some fields to
place inside a tiddler?
Cheers and thanks again for the feature+
Pier
After some sleep (and during some) I just answered myself the question
(: go to http://siteUrl/register.php). Sorry for the post before.
It works great !
I'm just wondering, if there are different privilege groups, in which
ones the self registered users end up. Is there a way to assign these
persons to a group?
Best
Pier
1/ open register.php
2/ go to line 70 and add a new line after it
3/ put in the following code after it
$content .= '$tiddlyCfg[\'group\'][\'<group name>\'][] =
'.$username.";\n";
replace <group name> with the group name of your choice
CC
I did this because I tried your explanation but I probably misplaced
step 3 (not able to count up to 70 I guess :-(
it showed this error so I deleted everything but I was probably logged
as this user.
I can't recover my sites (3 online versions).
Please Help !
Pier
Try change this line
$content .= '$tiddlyCfg[\'user\'][\''.$username.'\'] =
'.$password.";\n";
to these two
$content .= '$tiddlyCfg[\'user\'][\''.$username.'\'] =
'.$password.";\n";
$content .= '$tiddlyCfg[\'group\'][\'<group name>\'][]
='.$username.";\n";
You can try to use some text editor that shows line number such as
notepad++
After you delete the user.php, have you remove the include_once from
your config files?
CC
What were the problem before?
CC
this is the user.php file content :
<?php
$tiddlyCfg['user']['kool'] =dude;
$tiddlyCfg['group']['<group name>'][]=kool;
?>
<?php
$tiddlyCfg['user']['abc'] =def;
$tiddlyCfg['group']['user1'][]=abc;
?>
Where kool has a normal view of the site allthough I forgot to indicate
that he should have a user1 status.
Then I changed the register.php file to reflect that on any new
entrant, but abc has a wrong view of the site.
alpha (pwd omega) created straight into the default .php the "old way"
has a user1 privilege and can see the site normally (like kool).
Where's the catch?
Pier
your user.php file content is superb. Fixed the bug. A mistake on my
side. You can download them off sf again.
Cheers,
CC
I get this :
Fatal error: Call to undefined function: formatparameters() in
/mnt/132/sdc/0/6/p.edelman/WIK5/register.php on line 50
after I set the groupname as user1 and removed the // in front of this
line (new register file).
Kool and abc have the same view of the site as before, one Ok the other
notOk
I tried to remove the old user.php with their ID pwd and started with a
blank file again, but to no avail.
Any clue to what I did wrong ?
Pier
Could you use a new "user.php" and let me know if it works?
Thanks.
CC
New user darth , pwd : vador created OK, but its rights seem admin
like.
When trying to log it out I get this on top of the header now
Warning: Cannot modify header information - headers already sent by
(output started at /mnt/132/sdc/0/6/p.edelman/WIK5/config/user.php:1)
in /mnt/132/sdc/0/6/p.edelman/WIK5/index.php on line 29
Warning: Cannot modify header information - headers already sent by
(output started at /mnt/132/sdc/0/6/p.edelman/WIK5/config/user.php:1)
in /mnt/132/sdc/0/6/p.edelman/WIK5/index.php on line 30
Warning: Cannot modify header information - headers already sent by
(output started at /mnt/132/sdc/0/6/p.edelman/WIK5/config/user.php:1)
in /mnt/132/sdc/0/6/p.edelman/WIK5/index.php on line 31
the user.php file is empty
and it is not logged out.
the URL shows :
http://p.edelman.free.fr/WIK5/index.php?logout=1&logout=1&
Also, get some rest.
Take care
Pier
I got a slightly different error code when I logout after using
darth:vador. It says
Warning: Cannot modify header information - headers already sent by
(output started at
/mnt/132/sdc/0/6/p.edelman/WIK5/config/default.php:1) in
/mnt/132/sdc/0/6/p.edelman/WIK5/index.php on line 29
Warning: Cannot modify header information - headers already sent by
(output started at
/mnt/132/sdc/0/6/p.edelman/WIK5/config/default.php:1) in
/mnt/132/sdc/0/6/p.edelman/WIK5/index.php on line 30
Warning: Cannot modify header information - headers already sent by
(output started at
/mnt/132/sdc/0/6/p.edelman/WIK5/config/default.php:1) in
/mnt/132/sdc/0/6/p.edelman/WIK5/index.php on line 31
Can you remove any of the newline not within <?php and ?> in
default.php and user.php? They would tend to cause this problem when
there are too many linebreaks in between php scripts which got output
to the browser.
CC
Thanks. Need to struggle until the end of Jan for my deadline
unfortunately :(
CC
No change.
Then after chceking the user file, it showed no user group for darth
So I forced it at user1 but it makes no difference.
Pier
As more precision about the behaviour : it seems that the logout button
triggers the garbage on top of the header. When removing the
index.php?logout=1&logout=1&logout=1&... from the URL, it looks normal
again. But the user (any user) is still logged in.
Also, it is possible to enter another user and pwd and hit 'logout' to
be logged as this new user (also as anonymous and " "; then the button
reverts to login ).
Hope this helps.
Pier
Can you try to change the language back to english to see if it works?
Seems like there is a problem when I use a language with UTF8 formatted
php file.
CC
CC
CC
Hi CC,
I'm not sure since everything worked all right and all at once, all my
ccT 1.1 final sites (count 6) have this strange behaviour.
The 7th one with rel 1.0 is OK
In fact, it is only when I logout that this occurs.
To logout, I need an empty username field (or I keep being logged in ),
then I hit logout.
The garbage appears on top of the page and the url has :
/index.php?logout=1&logout=1&
If I erase this and reload it gets back to normal as anonymous or
whomever username had logged in instead.
If you care to check at http://p.e.free.fr/wik6/ with alpha omega as
loggin password, I'd appreciate.
(excuse me on the long delay between posts since I was working on the
translation; post coming soon).
Cheers
Pier
I've tried it on 1.0, and it seems incompatible :p But on 1.1 it works
like a charm. Anyway, I will upgrade to 1.1 later :)
On 2006年12月15日, 上午4時30分, "coolcold"
<google.coolc...@dfgh.net> wrote:
> Finally got time to release the user register script. As blogthis.php,
> it is released as patch/feature request. Be warned that passwords are
> not encrypted.https://sourceforge.net/tracker/index.php?func=detail&aid=1615995&gro...
>
> CC
I believe that the ugly warning on top of the header comes from this
line #31 in index.php and the 2 lines before :
header("Location:
".$_SERVER['PHP_SELF'].'?'.str_replace("logout=1&","",$_SERVER['QUERY_STRING'])); //redirect
to itself to refresh
It may not have anything to do with unicode and all.
Please help
Cheers
Pier