Judul: Berbagi Info Seputar How To Disable Drupal "Create New Account" Link or Tab If Using Profile2 Registration Path ? Full Update Terbaru
link: How To Disable Drupal "Create New Account" Link or Tab If Using Profile2 Registration Path ?
Artikel Terbaru How To Disable Drupal "Create New Account" Link or Tab If Using Profile2 Registration Path ? Update Terlengkap 2017
The default Drupal login page at /user/login shows three tabs - Login, Create New Account and Request Password. Using the tabs, a visitor can either login, create a new account or request password. If visitors cannot create accounts on the Drupal website themselves, then the "Create new account" link or tab can be disabled easily from Drupal administration. But when using Profile2 and Profile2 Registration path, the Drupal default "user/register" path lies redundant. In this post, we shall see how to disable the "Create new account" tab from the default user login page.
How to disable the "Create new account" link or tab if not using Profile2?
If we are not using Profile2 module to create separate profiles, and if we do not want users to be creating accounts themselves on the website then the "Create new account" tab or link can be disabled easily from the following step:
- Configuration > Account Settings > Registration and cancellation
- Under "Who can register accounts?", select "Administrators Only"
This will disable the "Create new account" link and only administrators can create new accounts if required.
How to disable the "Create new account" if using Profile2 and Profile2 Registration Path?
On one particular site, I have setup a separate profile called "Candidate" using Profile2 module and also setup separate registration path for the "Candidate" profile using "Profile2 Registration path" which is "/candidate/register".
- I want visitors to create account themselves via "candidate/register" path
- Using Profile2 Registration path module, candidates are assigned "candidate role"
- I don't want visitor accessing the default "user/register" path
I goal is to let the candidates register via "/candidate/register" path only. I am not expecting users to use the "user/register" link, which will be a regular Drupal account and not a "Candidate Account". So, the need to disable the "Create New Account" link or tab from the "user/login" page arises. The default login and request new password links may stay as that does not affect candidate login or password request.
Disabling the "Create new account" tab using Tab Tamer:
There are tips on Drupal.org to disable the "Create new account" using custom module. But if you do not want to write custom modules for this purpose, we can use the "Tab Tamer" module[1] to disable or hide certain tabs.
Tab Tamer is an administration utility that provides easy re-ordering, hiding, and deactivation of tabs and subtabs. You can also rename tab labels.
- Download Tab Tamer[2] module from Drupal.org
- Install the Tab Tamer module like you would install any other module at sites\all\modules"
- Enable the module
- Go to "/admin/config/system/tabtamer" and setup Tab Tamer to hide or disable tabs or link that are not required to be displayed
- Tab Tamer displays most of the tabs you'd see in Drupal and each of them can be individually enabled, disabled or hidden.
- To disable the "Create new account" tab, scroll down to till you see "User". Expand the item, and for the path "user/register", you can set it to:
-
- hidden: "Create new account" tab is hidden but the path "user/register" is still active. So if user enters the path "user/register" manually, the create new account page will still appear.
- disable: the "Create new account" tab is hidden as well as the path "user/register" disabled.
Tab Tamer Configuration Page |
- Save
- Flush Cache
- Test
Candidates can still register account themselves from "candidate/register" path:
Sponsored Links
References
- ^ "Tab Tamer" module (www.drupal.org)
- ^ Download Tab Tamer (www.drupal.org)
Itulah sedikit Artikel How To Disable Drupal "Create New Account" Link or Tab If Using Profile2 Registration Path ? terbaru dari kami
Semoga artikel How To Disable Drupal "Create New Account" Link or Tab If Using Profile2 Registration Path ? yang saya posting kali ini, bisa memberi informasi untuk anda semua yang menyukai Android Free User. jangan lupa baca juga artikel-artikel lain dari kami.
Terima kasih Anda baru saja membaca Artikel Tentang How To Disable Drupal "Create New Account" Link or Tab If Using Profile2 Registration Path ?