Developing a site that allows users to post images (node type = my_image) to a specific category. Basically, we create the categories and users submit images to them.
Users do not have menu or url permissions, we want to do this for them. When a user is in a category, the drupal form is displayed on that page using drupal_render_children().
In HOOK_node_insert (type == my_image) we identify what category they were in and add it to the menu. Following this we are trying to use pathauto_create_alias to generate the alias (based on title) but have been unsuccessful thus far (HOOK_node_update would, well update the alias).
Obviously, if we grant the user permission for menu and url, the alias is created. We don't want the user to have direct access to the menu system nor aliasing.
Does anyone know the proper way to use pathauto_create_alias in the above scenario?