User *friend_a = NULL;
User *curr = head;
while (curr != NULL) {
    if (strcmp(curr->name, name1) == 0) {
        friend_a = curr;
    }
    curr = curr->next;
}
check if a User node with the name attribute name1 is in a linked list