USER Methods
User status
login(), logout(), admin(), groups(), status()Creating and deleting users
create(), update(), delete()User information
index(), details(), directory()User registration
evaluate(), register(), hash(), activate(), password()
index()
The method is used to search for a user's database index or to return the curent user's index.
int index( string value [, int type = 0 ])
Return
User's database index
Parameter
Description
valueValue to search user by
type0 = nickname
1 = e-mail address
2 = hash value
1 = e-mail address
2 = hash value
Get current user's database index
$USER->index()
RETURN: 3
Search user by nickname
$USER->index('test')
RETURN: 3
Search user by e-mail address
$USER->index('testuser@opus9.org', 1)
RETURN: 796
Search user by hash-key
$USER->index('9fdda797acbd6344188dc46ee4e3acca', 2)
RETURN: 3