ACL: implement ACLGetUserByName().

This commit is contained in:
antirez 2019-01-10 16:40:45 +01:00
parent 29c88a9ce5
commit e4846b028d

View File

@ -132,7 +132,9 @@ unsigned long ACLGetCommandID(const char *cmdname) {
/* Return an username by its name, or NULL if the user does not exist. */ /* Return an username by its name, or NULL if the user does not exist. */
user *ACLGetUserByName(const char *name, size_t namelen) { user *ACLGetUserByName(const char *name, size_t namelen) {
return NULL; void *myuser = raxFind(Users,(unsigned char*)name,namelen);
if (myuser == raxNotFound) return NULL;
return myuser;
} }
/* ============================================================================= /* =============================================================================