how do I update the pointer to the user list instead of creating a local variable

int create_user(const char *name, User **user_ptr_add) {
    // check if the name is longer than the length limit.
    if (strlen(name) > (MAX_NAME - 1)){
        return 2;
    } 

    // create new user using calloc - will initialise all the structs internal elements to NULL
    User *new_user = calloc(1, sizeof(User));
    if (new_user == NULL) {
        // calloc failed
        perror("create_user calloc");
        exit(-1);
    }
    // set the name of the new user
    strcpy(new_user->name, name);

    // find the position to add the new user with name name while checking to make sure no other 
    // user has that name.
    User *latest_user = *user_ptr_add;
    // No current users
    if (latest_user == NULL){
        latest_user = new_user;
        printf("successfully added user"); // TESTING 
        return 0;
    }
    // find the latest_user added
    while(latest_user->next != NULL){
        if (latest_user->name == new_user->name){ // another user already has this name
            return 1;
        }
        latest_user = latest_user->next;
    }
    // found the last user 
    if(latest_user->name == new_user->name){
        return 1;
    }
    latest_user->next = new_user;

    printf("successfully added"); // TESTING

    return 0;
}