1
A
回答
0
這不是你想要的答案,但你會使用hook_form_alter改變目前的報名表爲自己省下不少麻煩:
http://www.lullabot.com/articles/modifying-forms-drupal-5-and-6
3
檢出hook_user和user_save()。
1
在這裏擴展Kevin的hook_user和user_save的建議,代碼可能如下所示:
// store user name
$user_name = "user123";
// store user email
$email = "[email protected]";
// set up the user fields, use user_password function for 8 character password
$fields = array(
'name' => $user_name,
'mail' => $email,
'pass' => user_password(8),
'status' => 1,
);
// give new user roles if needed, as shown below
$fields['roles'] = array('new_role');
// pass the fields to user_save() and leave first param empty to create new user
$account = user_save('', $fields);
相關問題
- 1. 如何在不使用API的情況下將用戶註冊到Drupal 6.x?
- 2. 在Laravel中手動註冊用戶
- 3. 在Drupal 6.x中
- 4. 在Drupal中掛鉤用戶註冊
- 5. 重寫用戶註冊表單在Drupal 6
- 6. Drupal註冊用戶頁面?
- 7. 如何添加語言切換用戶/註冊形式在Drupal 6
- 8. 爲什麼url沒有註冊?(Drupal 6.x)
- 9. 有多個用戶註冊頁面Drupal 6
- 10. Drupal:在註冊時修改用戶
- 11. Drupal 6.x CTools
- 12. 如何在drupal 7中註冊註冊表單?
- 13. 如何在註冊用戶時驗證Drupal 7中的用戶電子郵件
- 14. 如何只過濾drupal中的註冊用戶?
- 15. drupal 7配置用戶註冊過程
- 16. Drupal 7定製用戶註冊表
- 17. devoloper drupal手冊
- 18. 將註冊用戶與drupal 6中的特定內容相關聯
- 19. Drupal 6中的主題用戶註冊頁面,帶有Omega子主題
- 20. 如何在Firebase中註冊用戶名?
- 21. 在cakephp中自動註冊用戶
- 22. 如何設置django註冊帳戶需要手動激活?
- 23. 我如何獲取數據?(Drupal 6.x)
- 24. 手動註冊activex exe
- 25. 如何使phplist註冊表單將用戶返回到Drupal?
- 26. 如何使Drupal的重定向頁面用戶註冊
- 27. 註冊後註冊用戶
- 28. 註冊用戶和未註冊用戶
- 29. 手動註冊OCX文件
- 30. 在asp.net中註冊用戶
非常感謝,因爲這是一個很好的鏈接 – user363036 2010-06-10 11:47:39