setting userid("dbname")...?!?!

Thomasp

New Member
We have a character system, on unix...Our users, log in to unix, and userid("dbname"), returns their unix login...

We are now converting, to GUI, and I've done a lot of investigation, but it seems, if you have, or not, a _user record, or whatever, userid("dbname"), returns, either your computer name(in windows), or a blank...

I'd like to set the userid to something else, as I could log on to the system, from another machine...

Most of our report programs, and transaction changes, reference this userid("dbname"), to output to their directory, or log their name, in the changed record...

We could either, change, all the programs, to instead of using, userid("dbname") to another variable, or somehow set the userid ourself.

I'm sure, you understand, what I'm saying, and I hope you have a answer, it'll be most appreciated...

Thank you,
Thomas...
 

jamesmc

Member
Hi there Thomas,

I have taken a look in the help files that are supplied with the GUI editor and you should be able to retrieve the userid of the current user if there are no _user records available and the user logs into the network usering a unique username. I suppose thats not much help to you as you probably already know this.

How do the users currently log into the system? Are their usernames and passwords stored in the database or is it just database securities that are set up?

I would suggest that you might want to create a small front end to your system that asks for a username and a password, compares the values to some stored already in the database and allows or denies access from the results it gets. You could also set up a shared variable that is available the entire time the session is active that holds the username.

Hope this helps in some way!

James.
 

NickA

Member
An additional benefit of putting a new front end on that prompts for user name and password (As jamesmc recommended) is that it no longer needs to be operating system specific.

On our old V6 CHUI systems we had to find out what the opsys was from a parameter file, call loads of operating system specific stuff dumped to ASCII files, quoter it, load it in again etc. etc. to get various bits of login information.. a real pain.

Alternatively, if the platform is to be MS Windows, you _could_ made a call to the Windows API to get the current network login. The function you need is called 'GetUserName()'.

I found http://www.global-shared.com extremely useful for this kind of thing.
 
Top