User *find_user(const char *name, const User *head) {

    // loop through linked list
    User *curr = (User *) head;
    while (curr != NULL) {
        if (strcmp(curr->name, name) == 0) {
            return curr;
        }
        curr = curr->next;
    }

    // user not found
    return NULL;
}
return a pointer to the user with this name. the users are stored as a linked list