Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Security API > Methods

Security API: getUserData

Scroll Prev Next More

 

Returns an array with user data from the Login table.

 

Returns false if the user was not found.

Syntax

Security_getUserData(username, password)

Arguments

username

the username.

password

the user's password. This argument can be left empty.

Return value

Array with user data from the Login table.

 

Returns false if the user was not found.

Example

This example shows how to output the current user data:

 

print_r (Security_getUserData(username, ""))

Sample output

Array
(
   [ID] => 2
   [username] => admin_user
   [password] => admin
   [email] => no
   [fullname] => John Smith
   [active] => 1    
)

See also:

Security API: currentUserData

Security screen: Security settings

About Security API