How to make more than one user and "Admin"?
How to make more than one user and "Admin"?
Anyone know how to make more than one user of the pool an Admin?
I have someone that helps me out and I'd like to give him the ability to have Admin rights without giving him the Admin login, just to be safe. Any thoughts?
Phil
I have someone that helps me out and I'd like to give him the ability to have Admin rights without giving him the Admin login, just to be safe. Any thoughts?
Phil
-
- Posts: 15
- Joined: Wed Aug 28, 2013 9:19 am
Re: How to make more than one user and "Admin"?
This one would be tough to do since the Admin privileges are assigned strictly based on the username "Admin." I opened the Users table in the database and changed the Admin username to something else. I was then able to login as that user but it no longer had the Admin privileges and was just like any other player account. Most of the code in the ASP makes references to the "Admin" username which would make it difficult to have more than one Admin. I wonder if providing multiple admin username values in the ASP would then allow multiple Admins. Something I think I am going to test.
Re: How to make more than one user and "Admin"?
I know this is old, but I thought I would post a solution here for this.
As kristoffae said correctly, the code is written to use the name Admin as the only admin.
ALAS there is a work around for this. I haven't fully tested this but tested most functions. The trick is to re-code where the IsAdmin is declared.
in the common.asp find this:
and add the name pf the user you wish to add as an admin here like this:
The code checks the session for IsAdmin, now this will be true.
Hopes this helps.
As kristoffae said correctly, the code is written to use the name Admin as the only admin.
ALAS there is a work around for this. I haven't fully tested this but tested most functions. The trick is to re-code where the IsAdmin is declared.
in the common.asp find this:
Code: Select all
'--------------------------------------------------------------------------
' Returns true if the current user is the Administrator.
'--------------------------------------------------------------------------
function IsAdmin()
IsAdmin = false
if Session(SESSION_USERNAME_KEY) = ADMIN_USERNAME then
IsAdmin = true
end if
end function
Code: Select all
'--------------------------------------------------------------------------
' Returns true if the current user is the Administrator.
'--------------------------------------------------------------------------
function IsAdmin()
IsAdmin = false
if Session(SESSION_USERNAME_KEY) = ADMIN_USERNAME or Session(SESSION_USERNAME_KEY) = "Bam" then
IsAdmin = true
end if
end function
Hopes this helps.
"It is nice to be important, but more important to be nice"~~~ The Rock (Dwayne Johnson)