int delete_user(const char *name, User **user_ptr_del) {
    
    User *user_to_be_deleted = find_user(name, *user_ptr_del);

    // Check existence
    if (user_to_be_deleted == NULL) {
        return 1;
    }


    // Delete from main user list if first
    if (*user_ptr_del == user_to_be_deleted) {
        *user_ptr_del = (*user_ptr_del)->next;
        return 0;
    }


    // Delete from main user list if not first
    User *curr = *user_ptr_del;
    while (curr->next != user_to_be_deleted) {
        curr = curr->next;
    }
    curr->next = curr->next->next;
    return 0;


    // Delete friends
    User *friend_of_deleted;
    for (int i = 0; i < MAX_FRIENDS; i++) {
        friend_of_deleted = find_user(user_to_be_deleted->friends[i]->name, *user_ptr_del);
        
        int j = 0;
        while (strcmp(friend_of_deleted->friends[j]->name, user_to_be_deleted->name) != 0) {
            j++;
        }
        while (j < MAX_FRIENDS - 1) {
            friend_of_deleted->friends[j] = friend_of_deleted->friends[j + 1];
            j++;
        }
        friend_of_deleted->friends[j] = NULL;
    }
    return 0;

}
friend_of_deleted->friends contains the element user_to_be_deleted. This element should be deleted.