0

i am creating a social network site. I want when the users clicks join after entering his initial details such as name, email and password (the user does not need admin approval for account to be created) he or she is taken to a user registration page which looks like: https://i.stack.imgur.com/GvYaK.jpg

i know how to add fields from admin/settings/people but should i use profile 2 module? if so how exactly...also once the user clicks save profile (as in link above) then he or she is taken to his profile page where he can view his profile

4
  • when you say user registration page is it part of the registration process or do you want the user to be redirected to the user profile edit page? Jan 23, 2013 at 8:17
  • Have you tried something ?
    – niksmac
    Jan 23, 2013 at 8:20
  • Yes..i am trying to use the Profile2 module..but am not sure how to proceed
    – why
    Jan 23, 2013 at 9:34
  • I want it to redirect to profile edit..i am able to do that using rules..i am using Profile2 and adding new fields..however i also want the old fileds such as username, password,and email id to appear there
    – why
    Jan 23, 2013 at 11:04

1 Answer 1

0

You can control how the user is redirected after login using the Rules module. Create a rule using the event User logs in and action Redirect to page. You can create as many redirect rules as you need to get the user to go to the appropriate destination.

For example, for my social networking site, I do the following:

  • redirect users who haven't completed their profiles to a page telling them they need to do that (condition: user doesn't have profile_completed role)
  • redirect users who have completed their profiles and have new messages (from private message module) to the message inbox (condition: custom PHP condition)
  • redirect all other users to the search screen

In my implementation, I actually implemented this as a rule set (component) instead of a bunch of individual rules so that I could easily achieve the third option ("redirect all other users").

4
  • thanks...what url do i redirect to...also, how to crete new events or actions
    – why
    Jan 23, 2013 at 10:00
  • To learn how to use the Rules module, check out this excellent set of screencasts by Node One: nodeone.se/sv/node/752 (Links to the next screencasts in the series are sort of hidden on the right side of the page). As for which URL to redirect to, that depends on what page you want to send users to; that is up to your needs and specific case. Jan 23, 2013 at 10:02
  • Hi..i resloved that issue...one more question...i want to add a new password field..in the main profile by profile 2..it would be the same password that the user entered while registering but i just want to create a new field and have it copied the password or the user may enter it here again and be able to save
    – why
    Jan 23, 2013 at 10:31
  • @kewal On Drupal Answers, please only ask one question per post unless they are highly related. The reason for this is that future users to the site will be searching for specific questions, and if each post has multiple questions searching becomes very difficult. Jan 23, 2013 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.