Difference between revisions of "GETUID()"

From Lianjapedia
Jump to: navigation, search
 
(Description)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Function to get user identity
+
Function to get Linux user identity
 
+
  
 
==Syntax==
 
==Syntax==
 
GETUID()
 
GETUID()
 
  
 
==See Also==
 
==See Also==
[[ACCESS()]], [[CREATE]], [[GETENV()]], [[GETGID()]], [[GETGRNAM()]], [[GETPID()]], [[MODIFY STRUCTURE]], [[PUTENV()]], [[STR()]]
+
[[ACCESS()]], [[GETENV()]], [[GETGID()]], [[GETGRNAM()]], [[GETPID()]], [[PUTENV()]], [[STR()]]
 
+
  
 
==Description==
 
==Description==
The GETUID() function returns the user number.  In UNIX/Linux, this is the user number of the logged in user from the /etc/passwd file.  In OpenVMS this is the user number extracted from the UIC of the logged in user from the system authorization file.  The GETUID() returns a decimal value.  OpenVMS user IDs are stored in octal.  You may use the STR() function to convert the OpenVMS value to octal when using the GETUID() function.
+
The GETUID() function returns the current Linux user number as a decimal value.
  
 +
Note: this refers to the OS user account on Linux, not the Lianja [[Users and Roles]].
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
use accounts
+
if getuid() > 100 and getuid() < 200
@2,3 get name
+
//...
@3,3 get rates;
+
endif
when getuid() > 100 and getuid() < 200
+
read
+
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Environment]]
 
 
[[Category:Environment Functions]]
 
[[Category:Environment Functions]]
 +
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Function Extensions]]

Latest revision as of 12:17, 17 December 2021

Purpose

Function to get Linux user identity

Syntax

GETUID()

See Also

ACCESS(), GETENV(), GETGID(), GETGRNAM(), GETPID(), PUTENV(), STR()

Description

The GETUID() function returns the current Linux user number as a decimal value.

Note: this refers to the OS user account on Linux, not the Lianja Users and Roles.

Example

if getuid() > 100 and getuid() < 200
//...
endif