Posted by suganyaM on September 17, 2010 at 10:47am
Hi,
When i looked for drupal 6.x version of Profile Enforcer module, i got the Content Profile module that cover the same functionality of Profile Enforcer module.
The main objective of Profile Enforcer module is to restrict the user from other page views until the profile is complete. How to achieve the same functionality using Content Profile module.? I have installed Content Profile module, added few fields to the Profile CCK type, given the permission for the fields. Have I missed out some settings? Its urgent pls.
Can any one help me in this regards?
Thanks in advance.
Comments
Probably the easiest way to
Probably the easiest way to do it is by using Rules module. You could simply set redirect to profile or anywhere else you want to if profile node does not exist.
Its also good because you can fine tune which pages you want to be visible and which ones you want to forbid.
Hope that helps
Thanks for your reply. I did
Thanks for your reply. I did installed rules module as per your suggestion.
My requirement is to restrict user to view any pages, until he completes his profile. I have created the rules event and action. The action for the rule is to display a error message, 'You have not yet completed your profile. Please complete it before you proceed on'. But when the user browse any page, the user is left with a error message above the page content, and then the page content is displayed.
Is there any way to exit, that is the user should only be given the error message.
Thanks in advance.
I think you should be able to
I think you should be able to make a static page where user is redirected.
Thanks alot dmric. It worked
Thanks alot dmric. It worked for me.
Hi suganyaM, I needed to do
Hi suganyaM,
I needed to do the same thing that you and I created this rule:
ON EVENT Content is going to be viewed
IF
NOT User has content profile
AND User has role (authenticated)
DO
Page Redirect (node/add/profile)
Show a Message ("please complete your profile")
What rule did you use?
Luiz Coura
Hi Luiz Henrique Coura, More
Hi Luiz Henrique Coura,
More or less I have done with the same concept.
'page redirection' action to 'user/print $account->uid/edit' with message on top
else
load the page/form
The php code is :
<?php
$category = 'Personal Info';
$fields = _profile_get_fields($category);
$user_array = (array)$account;
$errorFlag = false;
while ($field = db_fetch_object($fields)) {
if($field->required && ($user_array[$field->name] == '')) {
$errorFlag = true;
$errorMessage = 'Profile Not completed';
break;
}
}
drupal_set_message($errorMessage);
return $errorFlag;
?>
Suganya M
http://suganya-drupal.blogspot.com/
I have a similar requirement
I have a similar requirement for my application.
I have divided the user profile registration into two sections, basic and full. The basic section only requires name and email, basic user information. Users who have completed this section have access to the forums and other community site features. My application also incorporates UC Marketplace, and in order for users to view seller profile information, complete transactions etc they need to complete the full section. The full section would require information pertaining to paypal accounts, credit card accounts etc.
Would it be possible to restrict access/capability based on whether the necessary profile registration sections are completed?
Been there, done that like so...
I would recommend installing Auto Role Assign module, which allows you to create unique registration pages for different roles. Then, you server content based on role type. As you might already know, you can restrict Blocks, Nodes*, and Views by role quite easily.
Another advantage of using Auto Role Assign is that you get the opportunity to create a registration page that is not entitled /user/register, which attracts spam accounts (they all know this page). You then can offer your unique registration links somewhere deeper so that the drive-by spammers don't pounce on it. Then, you can probably set a Rule to disable/delete/??? user accounts that are created from the user/register URL. At least, I'm hoping so. That is next on my list of things to do.
I use the above described approach on one of my sites: http://OPCofAmerica.org.
topnav: Awards
Apply for Awards Nomination
how to hide "create an acount" tabs in registration page?
can you tell me how to remove "create an account" page and show "access denied " message if anonymous user access "user/register" page?
Hello, Instead of redirecting
Hello,
Instead of redirecting the user to the profile creation page, is it possible to redirect him on the profile edit page if a specific cck field is still empty ?
For example, the user has to fill in basic informations when he creates his account. The profile has also some extended informations such as bio fields etc and I want to redirect him on the profile page if the bio field is still empty.
How can I do that ?
Thank you