我在drupal中创建了一个站点,默认登录url是mydomain.com/user
我没有找到插件或扩展drupal创建自定义登录url。
是否有任何插件,扩展或简单的编码来创建自定义登录url?
你好,
在hook_menu中你可以添加这样的路径menu:
$items["compte/%user"] = array(
'title' => 'Mes informations de connexion',
'description' => 'Mes informations de connexion',
'page callback' => 'drupal_get_form',
'page arguments' =>array('user_profile_form',1),
'access arguments' => array('change own username'),
'type' => MENU_LOCAL_TASK,
'file' => 'user.pages.inc',
'file path' => drupal_get_path('module', 'user'),
'weight' => 4,
);
从另一个URL访问它的最简单方法是为当前URL创建别名。如果是出于安全考虑,这样做不会使/user path无效,但会为login创建一个新路径。