Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Saturday, August 23, 2025
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
8/23/2025 3:27:45 AM
slxdeveloper.com Community Forums
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics
(for Windows client only)
. View the
code of conduct
for posting guidelines.
Forums RSS Feed
Back to Forum List
|
Back to SalesLogix Scripting & Customization
|
New Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: Get Current User?
Norm Jones
Posts: 8
Get Current User?
Posted: 15 Feb 08 3:49 PM
Hi--
it's been a while since I've coded in SLX. So, here's what may be the dumbest question out there right now-- how do I get the current user (logged in) ID, information and determine if they are an admin or not?
Thanks,
Norm
[
Reply
][
Quote
]
Bob (RJ)Ledger
Posts: 1103
Re: Get Current User?
Posted: 15 Feb 08 9:13 PM
In 6.0 and up..
Application.Basicfunctions.CurrentUserID
It's in the Lan Dev ref... and "Intellisense".
--
RJLedger - rjlSystems
[
Reply
][
Quote
]
Norm Jones
Posts: 8
Re: Get Current User?
Posted: 18 Feb 08 7:28 AM
OK-- that is just weird. I remember looking at Basic Functions but didn't see it in the list. But alas-- it is there.
thanks for the info-
[
Reply
][
Quote
]
Norm Jones
Posts: 8
Re: Get Current User?
Posted: 18 Feb 08 7:30 AM
BTW-- what's the best way to determine if the user is an admin-- in other words, which field in the USERINFO table (or should I use a USERSEC table?) to test whether a user is an admin or not.
thanks!
[
Reply
][
Quote
]
Bob (RJ)Ledger
Posts: 1103
Re: Get Current User?
Posted: 19 Feb 08 6:17 AM
There is only one "Admin" user.
However, you can "grant" (using roles in the Admin tool) "admin rights" using role profiles to regular users.
Doing
SELECT ADMINROLE
FROM sysdba.USERSECURITY
WHERE USERID = Application.Basicfunctions.CurrentUSerID
If ADMINROLE contains data then the user has a "role"..
--
RJLedger - rjlSystems
[
Reply
][
Quote
]
Phil Parkin
Posts: 819
Re: Get Current User?
Posted: 19 Feb 08 4:27 PM
If you really do mean specifically the ADMIN user ...
If Application.BasicFunctions.CurrentUserID = 'ADMIN' Then
---do stuff---
End If
[
Reply
][
Quote
]
Bob (RJ)Ledger
Posts: 1103
Re: Get Current User?
Posted: 20 Feb 08 7:03 AM
Quote:
Originally posted by Phil Parkin
If you really do mean specifically the ADMIN user ...
If Application.BasicFunctions.CurrentUserID = 'ADMIN' Then
---do stuff---
End If
Well.. he said ...
... if the user is an admin...
not
... if the use IS admin...
I took it literally
--
RJLedger - rjlSystems
[
Reply
][
Quote
]
Phil Parkin
Posts: 819
Re: Get Current User?
Posted: 20 Feb 08 1:47 PM
yeah, I saw that & didn't answer the 'an' bit because it made no sense to me why you would ever do that! Unless you are then going to work out which admin role the user has and then what they can do with it ... yuk!
But between us I think we have all avenues explored...
Phil
[
Reply
][
Quote
]
Bob (RJ)Ledger
Posts: 1103
Re: Get Current User?
Posted: 21 Feb 08 7:02 AM
Phil,
You are correct.. it's a mess to try and use the roles "feature" for anything other than what was intended.
--
RJLedger - rjlSystems
[
Reply
][
Quote
]
Page 1 of 1
You can subscribe to receive a daily forum digest in your
user profile
. View the site
code of conduct
for posting guidelines.
Forum RSS Feed
-
Subscribe to the forum RSS feed to keep on top of the latest forum activity!
slxdeveloper.com is brought to you courtesy of
Ryan Farley
&
Customer FX Corporation
.
This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.
code of conduct
|
page cache (param): 8/23/2025 3:44:03 AM