Gossamer Forum
Home : Products : DBMan : Customization :

$db_userid bug in 2.04?

Quote Reply
$db_userid bug in 2.04?
I thought this would be the right forum to ask about this. Besides, it's nice to be able to christen the new forum. Smile

I was tearing my hair out last night trying to figure out why the user id wasn't being added to the records. I finally replaced:

else { ($db_userid) = $db_uid =~ /([A-Za-z0-9]+)\.\d+/; }

with the older version of the line --

else { ($db_userid) = $db_uid =~ /([A-Za-z]+)\d+/; }

and it worked just fine. It doesn't allow users to have numbers in their user id's, but I can live with that.

My apologies to someone I was corresponding with who couldn't get the $db_userid to work the way he wanted to. At that point I was going by an earlier version than 2.04.

On another note -- I have just begun to really appreciate the coding that Alex did in DBMan and his other scripts. I came across a script written by someone else that I needed to customize a bit. What a mess! Alex's code is very tidy and easy to follow. But, since his is the first Perl script I dealt with, I didn't fully realize how well-written it is. Boy, am I spoiled!!! Smile



------------------
JPD
Quote Reply
Re: $db_userid bug in 2.04? In reply to
Hi JPD,

I have 2.04 running fine and the userid is being stored in $db_userid. Is it not doing it for you? Turn on $db_debug and when you move around you should see:

User ID : admin

(assuming you are logged in as admin).

Cheers,

Alex

Quote Reply
Re: $db_userid bug in 2.04? In reply to
It took me a while, but I finally figured out why it wasn't working. The bug was in my brain, not the script! Smile



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