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?
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
All new users will be in the "user" group. If you are confident in editting the file, do the following
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
I'm in trouble : The site now shows 500 Internal Server error after I deleted the user.php file which contained the username and password of a self registered user I created.
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?
Hi, Sites are back to normal it seems Thank you very much. I will install another site with all I've learned and experimented so far. I will be back to the registration after that. Cheers Pier
Hi, THis 500 internal server error was maybe due to a misplacement of the line $content .= '$tiddlyCfg[\'group\'][\'<group name>\'][] = '.$username.";\n"; then I tried to delete all that pertained to register but I had left the default.php with the add on line and that was it. I think that the new user I had tried was logged on when I cleaned the files but did not dissapear entirely. So I deleted one occurence in the DB (the tiddler this "new user" created). But that did not revert the site to normal. Hope this explaination helps? Pier
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
Sorry, am too tired lately with my work and keep on making mistakes. Please uncomment the formatParmeters function (removing /* and */). Otherwise I have updated the one on sf's site. I have also added a new variable, $user_group, to ease changing default user group in the new one.
Could you use a new "user.php" and let me know if it works?
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