Gossamer Forum
Home : Products : DBMan : Installation :

Admin problems....

Quote Reply
Admin problems....
I have added the lookup code to the dbman script and whenever I am in admin mode and try to add permissions to a user and then click on the "Update/create user" button I receive "email already in password file" or "password already in the password file", and will not let me update the users permissions.

Any ideas on why this might be happening?
Quote Reply
Re: Admin problems.... In reply to
Probably because I didn't test out that part of it when I made the mod. My fault.

Okay. The mod says:

Code:
after

($in{'username'} && !$in{'inquire'}) and do {


add

open (PASSWD, "<$auth_pw_file") &#0124; &#0124; &cgierr("unable to open password file. Reason: $!\n");
@passwds = <PASSWD>; # Let's get the user id and passwords..
close PASSWD;
PASS: foreach $pass (@passwds) { # Go through each pass and see if we match..
next PASS if ($pass =~ /^$/); # Skip blank lines.
next PASS if ($pass =~ /^#/); # Skip Comment lines.
chomp ($pass);
($userid, $pw, $view, $add, $del, $mod, $admin,$email) = split (/:/, $pass);
if ($in{'email'} eq $email) {
$message = "Email address already in password file.";
last CASE;
}
}

Take that out. Just be careful not to change anyone's email address to be the same as anyone else's in your password file.

Thanks for mentioning this, though. I'll upload an edited version right now.



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





Quote Reply
Re: Admin problems.... In reply to
I hope you are getting your work acomplished JP..... however, if you are around what file is this found in?
Quote Reply
Re: Admin problems.... In reply to
Now I am feeling bad about keeping you around to answer my questions - but I don't know who else to turn to - and you really know this script - I removed that piece of code and still I am having the same problem.

I have made my code available and readable at http://www.cocoahighalumni.com/dbcgi.txt

Maybe when you have some time you could take a look at it?

Thanks !
Quote Reply
Re: Admin problems.... In reply to
Well, I couldn't stay away. And, since this is about my own mod, I felt I had to answer.

The section of code I'm referring to is in db.cgi, sub admin_display.

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





Quote Reply
Re: Admin problems.... In reply to
JPD -
I figured this out finally ! So much of the script looked alike.... I was removing the wrong lines.

Finally found the right place and it now works... again, I really appreciate your help... and I really hope you were able to get your work accomplished this weekend!

There are still a few things with the database that I need to get worked out. I will continue to try and work them out myself - but if you make it back and know the answers to these problems I would appreciate the help !

Thanks !