Login/Register to access content + only with email address
Hello everybody ! :)
I need some help. I'm French so be lenient with my English practice !
In my Drupal website, I have a frontpage (a "page" content) which display some data + the login form (as the same of the navigation menu).
The first problem : only registered user could access to the rest of the website, for that I disabled the checkbox "access content" for anonymous user. But my frontpage is a content ! How could I allow access to frontpage for anonymous user ?
The second problem : I just want users to use email adress for login and register (like a newsletter) but I don't know how to do this. I found the "LogginToboggan" module which can replace the login field with email field but doesn't disable the login and password fields for registering.
Can someone be my messiah ? :D
Regards

By "login field", i mean
By "login field", i mean "Username field" :P
1 ) create a new content
1 ) create a new content type
2 ) Create your front page as new content type
3 ) Grant "access content" for anonymous user to this content type. Remove all other permissions.
Alternatively enable login block , which should be much simpler but that should be default, so I am guessing that you have disabled login block.
1 ) create a new content
1 ) create a new content type
2 ) Create your front page as new content type
3 ) Grant "access content" for anonymous user to this content type. Remove all other permissions.
Alternatively enable login block , which should be much simpler but that should be default, so I am guessing that you have disabled login block.
3 ) Grant "access content"
How could I do this ?!! There is no checkbox for specific content access...
PS : I already have enabled the login block, which is only displayed in frontpage content. ;)
Is specific content/page
Is specific content/page restriction impossible ? Nobody knows please ?
Thanks
same problem here, any
same problem here, any solution. I'd like to secure a page to a certain user role, however restricting to view content types does not seem possible. Any solution?
Tino
content access module
Have a look at the content access module!
frontpage
for the anonymous front page, have you looked at the front page module? you can create different front pages for roles. in my own case, i had to put my full html code (paragraphs, breaks, everything) into the anonymous block provided, and be sure any graphics, etc. are accessible to anonymous (probably in drupal_home). once they log in, authenticated users get their page(s).
since the only "content" provided is what is in the block (it is fairly static), you are rather limited in what you can present to the anonymous users... test well; i have seen "odd behavior," like "accessed denied" messages when logging off.
remember that this is only the front page; if you are looking for content security beyond authenticated, look at the content access module(s). there are many, depending on what you are trying to do (i use tac_lite, personally).
good luck!
For your 2nd problem, try
For your 2nd problem, try Email Registration module: http://drupal.org/project/email_registration
http://www.xweb.com.au
Email Address Only for Register and Login
My client prefers to only use an email address for logins. My solution was to:
1. Install the http://drupal.org/project/logintoboggan to allow a user to login with either a username or email adresss; and
2. Modify /modules/user/user.module to:
a. Remove the username field on the form in function user_edit_form:
Replace:
if (user_access('change own username') || $admin || $register) {
With:
if (user_access('change own username') || $admin ) {
b. Disable the username verification in function _user_edit_validate:
Replace:
if (user_access('change own username') || user_access('administer users') || !$user->uid) {
With:
if (user_access('change own username') || user_access('administer users') ) {
c. Replace the username with the email in function user_save:
insert:
$array[ 'name' ] = $array[ 'mail' ] ;
before:
// Note: we wait to save the data column to prevent module-handled
// fields from being saved there. We cannot invoke hook_user('insert') here
// because we don't have a fully initialized user object yet.
Revisions:
Drupal: 6.2
logintoboggan 6.x-1.2
This has the disadvantage that user.module must be modified after an upgrade.
This allows the administrator to create usernames through the User Management page.
Use this modification at your own risk.
Consulting services are available for Drupal and other PHP / MySQL projects.
drupal@Sunrise-Resources.com
www.Sunrise-Resources.com