MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ACLGetUserByName

Function ACLGetUserByName

src/acl.cpp:1173–1177  ·  view source on GitHub ↗

Return an username by its name, or NULL if the user does not exist. */

Source from the content-addressed store, hash-verified

1171
1172/* Return an username by its name, or NULL if the user does not exist. */
1173user *ACLGetUserByName(const char *name, size_t namelen) {
1174 void *myuser = raxFind(Users,(unsigned char*)name,namelen);
1175 if (myuser == raxNotFound) return NULL;
1176 return (user*)myuser;
1177}
1178
1179/* Check if the command is ready to be executed in the client 'c', already
1180 * referenced by c->cmd, and can be executed by this client according to the

Callers 7

clientCommandFunction · 0.85
ACLCheckUserCredentialsFunction · 0.85
ACLAuthenticateUserFunction · 0.85
ACLLoadConfiguredUsersFunction · 0.85
ACLLoadFromFileFunction · 0.85
aclCommandFunction · 0.85

Calls 1

raxFindFunction · 0.85

Tested by

no test coverage detected