Hi. I want extend normal user registration with own user types. I need add under task menu item register my own task menu (with my own user types). Like this:
log in |[ register ]| request new password
---------------------------------------------------
[ user type1 ]| user type 2 | user type 3
I have tried hook_menu in my module but new local task menu doesn't appear. How to i can do this?
My current code (in my module enigma_profily):
<?php
/**
* Implementation of hook_menu().
*/
function enigma_profily_menu($may_cache) {
global $user;
$admin_access = user_access('administer users');
$items = array();
if ($may_cache) {
$items[] = array('path' => 'user/register', 'title' => t('register'),
'callback' => 'enigma_profily_user_register', 'access' => $user->uid == 0 && variable_get('user_register', 1), 'type' => MENU_LOCAL_TASK);
}
else {
// user can register as one of user type from menu
$items[] = array(
'path' => 'user/register/'.PROFILE_TYP_POUZIVATEL,
'title' => 'Nový používateľ',
'access' => true,
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 8);
$items[] = array(
'path' => 'user/register/'.PROFILE_TYP_SPOLUPRACOVNIK,
'title' => 'Nový spolupracovník',
'access' => true,
'type' => MENU_LOCAL_TASK,
'weight' => 9);
$items[] = array(