By finke77 on
Hello!
I am trying to develop my first module which should create users.
The function "create_user_test" for which a menu item is defined in the mymodule.module is called in Drupal fives times!
I am really shure that there is no loop or a while in the import_user.inc code.
Does anyone know why this is happening?
My mymodule.module file
function cfimport_perm() {
return array('access cfimport');
} // function cfimport_perm()
function cfimport_menu() {
$items = array();
//Menu for Guestbook
$items['cfimport/import_gaestebuch'] = array(
'title' => 'Import Gästebuch',
'page callback' => 'cfimport_gaestebuch',
'access arguments' => array('access cfimport'),
'type' => MENU_NORMAL_ITEM,
'file' => 'import_gaestebuch.inc',
);
//Menu for New
$items['cfimport/import_news'] = array(
'title' => 'Import News',
'page callback' => 'cfimport_news',
'access arguments' => array('access cfimport'),
'type' => MENU_NORMAL_ITEM,
'file' => 'import_news.inc',
);
//cfimport_user
$items['cfimport/import_user'] = array(
'title' => 'Import User 2',
'page callback' => 'create_user_test',
'access arguments' => array('access cfimport'),
'type' => MENU_NORMAL_ITEM,
'file' => 'import_user.inc',
);
return $items;
}
function cfimport_access($op, $node) {
global $user;
switch ($op) {
case 'access':
// only users with view permission may view.
return user_access('access cfimport');
break;
}
}
Best regards,
Christian
Comments
if some one, or some steps
if some one, or some steps connect to your site : http://xxxx/cfimport/import_user/xx
it may click start your function.
different problem ...
Hello!
It seems to be a different problem.
I created a new topic for it:
http://drupal.org/node/414408
Best regards,
Christian