Gossamer Forum
Home : Products : DBMan : Customization :

default users and password users

Quote Reply
default users and password users
i am setting up an adverts database and want to use dbman.

i have set up the default user correctly with the view option only and it works fine.
i also want to set up users with permissions to add and delete ads (no modify). again no problem. but i want them to create their own usernames and passwords which will then be passed to the passwords file.

I dont want to have to issue passwords, but that seems to be where i am stuck at the moment. is there no way for new users to post usernames/passwords directly to the passwords file without having to go through me first.

it is essential that users be able to delete their own records, otherwise i wouldnt bother.
Quote Reply
Re: default users and password users In reply to
You can use the signup feature.

In your .cfg file, set

$auth_signup = 1;
@auth_signup_permissions = (1,1,0,1,0);

Unfortunately, there's no link on the login page for the signup page, so it's hard to know how to get there.

In html.pl, sub html_login_form, after

Code:
<p align=center><center><input type="SUBMIT" name="login" value="Logon">
<INPUT TYPE="SUBMIT" NAME="logoff" VALUE="Cancel"></center></p>
</td></tr></table></center></form>

add

Code:
|;
if ($auth_signup) {
print qq|<tr><td><$font>You can sign up for an account online right
<a href="$db_script_url?db=$db_setup&signup_form=1">here</a>.</font><P>
|;
}
print qq|

If you want to add a link from a static html page to the signup form, use

Code:
<a href="http://www.server.com/.../db.cgi?db=default&signup_form=1">

Of course, you would fill in the full URL to db.cgi and, if your database was not "default," you would change the "db=" part to match your database.





------------------
JPD






Quote Reply
Re: default users and password users In reply to
Hi JP

Well I managed to get it working, tho not quite the way i expected. i now end up displaying the home page instead of the logon page. I thought that I would try to install it as is on my isp server, where my website is, but of course nothing works at all then.

i now got an error message:

CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: (Maybe you didn't strip carriage returns after a network transfer?)

Script Location : db.cgi
Perl Version : 5.00404
Setup File : default.cfg
Session ID : default

So it seems like i have a double problem: first to get the logon page instead of the home page, and then to see if the auto password works. second to get it working in any form on my website.

any takers on this.

You can have a look at it at www.gazzer.com/dbmantest to see what i mean.
Quote Reply
Re: default users and password users In reply to
Almost always the error message

(Maybe you didn't strip carriage returns after a network transfer?)

means that you uploaded at least one file in binary mode. All files have to be uploaded in ASCII mode. Try uploading the files again.

What are your settings in the authorization section of your .cfg file?


------------------
JPD






Quote Reply
Re: default users and password users In reply to
JP you are a genius.

I want to send you a little something from scotland. Do you have a po box or something I can send it to.

gaz
Quote Reply
Re: default users and password users In reply to
JPDeni,

Is this procedure for getting the signup to appear at login documented anywhere else?

I couldn't seem to find it in the various resources I looked through until I started roaming through the archives.

My humble suggestion would be for a blurb (or a link to a blurb) describing this be added to the "Tutorial : Set Permissions" section of your page.

Might make it easier for others to get at this information.

If I am in fact just a big doofus and missed it being listed somewhere obvious, then I shall inflict beatings on myself with my mousepad at your request...
Wink


juan







Quote Reply
Re: default users and password users In reply to
You're right. I'll add it to the FAQ in the Resource Center right now.


------------------
JPD