Different User group on registration joomla 3 - php

I have two user groups, student and business. On registration I want the user to select if they are a student or a business and when they click register I want them to be added to their user group automatically.
I can add the list to the registration.php and registration.xml file but how do I configure it so they get added to their specific group?

Download and try the free Joomla extension Usergroup Selector
I have tried it. It does what you want to do. You can configure it to allow the groups that you want. The groups show up on the registration form.

Related

User registration on Joomla

User registration:
One user registration and there are two types:
1) Teacher
2) Student
when user come in user registration form and put mandatory information, And also there drop down list Teacher and Student, Choose one option.
And open their related fields when choosing second option first option is hidden and second will appear on the screen.
And then register.
Try using two different templates for registration. One is for Teacher and one is for student. And override the registration on your templates. That is simple and you'll have full control over the two different sections.

Control user access and relations to nodes and their authors in Drupal 7

I am trying to do the following in Drupal 7:
Users in my website will post ads and others will pay to get in touch with the author of the ad.
Users that are buying the contact information have to see all of the content of the ad(node), except for the author. After they pay, they should see an extra field in the ad, telling them who the author is.
My question is:
How can I control the user access per node and per user for a specific part of the node? Are there any modules for this?
Also, a relation between the user and the ad would be nice, since I will later have to list all ads for a user, etc..
I found many plugins, but they seem to deny or allow access to the entire node and my functionality should be different.
Thanks in advance
In order to allow only specific users or roles to view specific nodes, this module can help you:
https://www.drupal.org/project/nodeaccess
Also, as you want to restrict permission by field, the Field Permissions module can do the work for you:
https://www.drupal.org/project/field_permissions
Of course you might need to write some custom code or use Rules module to grant permission to the users who are going to be allowed to see some nodes/fields based on actions they do on your website.

Joomla 3 Guests Redirect

So I have few articles in my menu which are for registered users only. I want them to be visible for everyone but if the user is not logged-in once he clicks on the menu I want him get redirected to the login page..
I saw this tutorial: Auto redirect guests to login but it seems outdated, in joomla 3.3 I can't find any "alias" menu item type.
Is there any alternative for that?
Iam using Joomla 3.3.1 with Community Builder.
-Thank you.
There are two ways you could do this really. One is through code and the other is through the administrators panel. I'm assuming based on the question you are interested in the back end solution.
This involves creating two unique menu items with the same name (alias' would need to be different). One which is only visible to logged in users, which points to the component view desired. The second menu is only visible to guests, and will point to the user log in component view with a redirect url set to component view you wish them to be redirected to.
I attached a link below to an article explaining how to only show menu items to guests and have them hide when users are logged in.
http://docs.joomla.org/How_do_you_hide_something_from_logged_in_users%3F

show orders placed by members in a custom view (showing registered members)?

I have a custom view in my Drupal it has "Commerce KickStart", that view lists the registered members on the site, i want it to also show the orders made by each member.
How can i achieve that? Thx!
This can be done by creating 2 views
Displays registered users on the website
Displays the order details as per the uid
Then you can make use of Viewfield module which will allow you to reference the second view from the first as a field.
Please read the documentation of the module

Drupal 7 user module customize for registration for different roles

I have a requirement of customizing user signup form in Drupal 7. i am not getting any relevant help from the internet . so i thought i should ask the expert here.
Requirement is i have two roles say "Student" and "Teacher". I have to use default user module for their signup by setting their roles automatically.
Now there will be two links one for Student signup another for Teacher Sign up. When user click on Student SignUp i am hiding some fields of default user module which are suppose to fill by a teacher, so student will see only fields, which are specified. Same for Teacher i am hiding fields which student suppose to fill.
So basically with the use of default user module i have to perform the sign up process.
Solution what i think could be possible :
I can set a variable in the link saying "studetnSignUp?status=student" and same for Teacher "studetnSignUp?status=teacher". Now the problem is i can do this in php but do not have proficient way to the same in drupal.
If it can be possible with any other approach please let me know. As it is really urgent for me. Your support will be really appreciated.
Thanks.
You can look into Profile2 in combination with Profile2 Registration Paths. It provides you with the ability to set a unique registration path for each Profile2 profile type. Per profile type you can define different fields. And I think a helpful feature is that it can assign user roles by registration path.
I would grab the passed parameter using menu and then call
hook_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'user_profile_form') {
// do your processing here
}
}
alter the layout of the form dependant of the user, and specify the users role in the form to, ie teacher or student

Categories