Forums

Subgroups of different registered Users?

Emerahl 05 Oct, 2009
Chronoforms is a great tool and I wonder if this is possible:

In Joomla1 1.5. there is still no possibility of dividing Registered Users in several subgroups. It is promised that this will appear in Joomla! 1.6. But perhaps it is already possible with chronoforms? I did not yet find anything about this.

On the website I refer to, different download documents are offered for different advanced educations and for every different education there should be a different login. Nevertheless they are all just Registered Users. So it would be necessary to divide the Registerd Users in specific subgroups.

So at the moment every Registered User can login in all download pages for all advanced educations.

If anybody has a solution for this problem, it would be great. Otherwise I will have to wait...

Thank you and many greetings
GreyHead 05 Oct, 2009
Hi Emerahl,

There are several other components that can do this for you, I'm sure that they all have pluses and minuses. This woudl be the preferred route if you want to apply grouping across large areas of your site.

You can do it with ChronoForms in two ways. They both save extra information about the user from a new registration form. You an either:

A) Save the data in a new table linked to the Joomla User table by the user id. This is the better route if you ahve a lot of data to save. Or

B) Add a new user parameter (like the user language option) that is stored as a parameter in the current jos_user table. This is the better option is you have a few well specified items ot collect like gender, dob, language, or possibly a user group.

Bob
Emerahl 05 Oct, 2009
Hi Bob,
thank you so much for your quick answer!
The fact is, that there is only needed username and password to login and those have been set by the teacher before and I have created a new Registered User in the Joomla! User Administration for this. So the people who want to download documents for a specific education already got the login data from their teacher and do not need to register anymore. At least there will be only five different education classes with five different logins, set by the teacher for all participants of one education class.

I am not sure if I can use your possibility B) for this issue?

Thank you and many greetings
GreyHead 05 Oct, 2009
Hi Emerahl,

Do I understand correctly that you only have a small number of registered users and tha teach class uses the same login for all students?

Then I'd just put an array at the start of the form html and check that to see what to display for the current user.

Bob
Emerahl 05 Oct, 2009
Hi Bob,
yes, I think you are right. At the moment, there are only two different classes with two different logins (there will be five some day...), so two different registered users.

I can try, what you suggested - but do you already know a tested and working code for the array in the form code?
Emerahl 05 Oct, 2009
... sorry, I forgot:
Thank you so far and many greetings
Emerahl
GreyHead 05 Oct, 2009
Hi Emerahl,

I guess the simplest is a switch statement:
<?php
$user =& JFactory::getUser();
switch ( $user->id ) {
  case '3':
    // code for user 3
    break;
  case '4':
    // code for user 4
    break
  . .  .
  default:
    // code for any other user
  break;
}
?>

Bob
Emerahl 05 Oct, 2009
Hi Bob,
thank you so much for your help - I will try it and then post the results.

Have a nice day,
Emerahl
This topic is locked and no more replies can be posted.