Using cf to do Joomla Reg to a different group

rushseeker 19 Jan, 2011
I have 2 user group.
I have a CF form that make registation for group "registered". I want that CF make for group "JobSeeker".

Any solution?
GreyHead 19 Jan, 2011
Hi rushseeker,

Is this Joomla! 1.5?

Please see this post of Fredrik's. is this the code you need?

Bob
rushseeker 19 Jan, 2011
Thank you for your reply!

Sorry for first post... unclear!

I need To registerd under group Jobseeker using Chronoform, not Registered.


Site information:
joomla 1.5.2
ArtOfUser
Virtuemart 1.1.6
-----------------

I put this code in tab formcode under "before sending email:" it's right?
but there's no change...

<?
$user =& $MyPlugins->cf_joomla_registration['user'];
$auth =& JFactory::getACL();

// Grant user "Author" membership using Joomla's JAuthorization class
$user->set('gid', $auth->get_group_id('', 'Testgrupp', 'ARO'));
if (!$user->save()) {
  JError::raiseWarning('', JText::_($user->getError()));
}
?>


I read... JFactory::getACL();
i Think: I don't have any AxACL... i have ArtofUser that give me the creation of group, in this case Jobseeker that is a undergroup of Registered...

Registered
|____________JobSeeker.

I hope my English is understandable.
Thanks Again!
GreyHead 19 Jan, 2011
Hi rushseeker,

ACL is a part of the standard Joomla! installation that handles user access control.

I'm afraid that I don't know anything about Art of User or how it works. If you can find the code that is needed to set a user group then it can probably be run from ChronoForms.

Bob
rushseeker 19 Jan, 2011
Little Update

I Notice that all my registration HAVE DUPLICATE RECORD!

1 Record have all information Ex:

NAME USERNAME E-mail gid ID
TEST4 TEST4 [email]TEST4@TEST4.it[/email] 18 123
EMPTY EMPTY EMPTY 1 124


Why?
GreyHead 19 Jan, 2011
Hi rushseeker,

Possibly because you have set up a DB Connection to the jos_users table that is not needed.

Bob
rushseeker 20 Jan, 2011
Thank you...
You are right, duplicate record that because i was setup db connection.


This is my form

<input  type="Hidden" id="usertype" name="usertype" value="JobSeeker"/>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Nome*</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="Inserisci il tuo nome*" id="text_0" name="text_0" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>


<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Utente*</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="inserisci il nomeutente" id="text_2" name="text_2"  type="text" onChange="CheckUtente(this.value);"/>
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Email*</label>
    <input class="cf_inputbox required validate-email" maxlength="150" size="30" title="inserisci una mail valida" id="text_5" name="text_5" type="text" />
   </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
 <label class="cf_label" style="width: 150px;">Email di Conferma*</label>
    <input class="cf_inputbox required validate-email" maxlength="150" size="30" title="inserisci una mail valida" id="text_15" name="text_15" type="text" />
   </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_password">
    <label class="cf_label" style="width: 150px;">Password*</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_3" name="text_3" type="password" />
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_password">
    <label class="cf_label" style="width: 150px;">Conferma Password*</label>
    <input class="cf_inputbox required" maxlength="150" size="30" title="Conferma Password errato" id="text_8" name="text_8" type="password" />
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_captcha">
    <label class="cf_label" style="width: 150px;">Immagine di Controllo</label>
    <span>{imageverification}</span> 
    
    </div>
  <div class="cfclear"> </div>
<div>
Accetta i termini di servizio<input type="checkbox" id="id_termini"  name="Accetta i termini di servizio" value="Accetta i termini di servizio" />
</div>
</div>


<div class="form_item">
  <div class="form_element cf_button">
   <input value="Registra" name="button_6" type="submit" /><input type="reset" name="reset" value="Reset"/>
  </div>
  <div class="cfclear"> </div>
</div>


I notice that only Hidden field was in database...
GreyHead 20 Jan, 2011
Hi rushseeker,

In which table? In jos_users - there is a usertype column there but no text_0 column.

But I'm not certain that setting the usertype to 'JobSeeker' will do everything that is needed to set up the correct access control.

Bob
rushseeker 20 Jan, 2011
so.. i need text_0 (the name of the user ) in hidden? but... in this manner the users can't write in.
GreyHead 20 Jan, 2011
Hi rushseeker,

No not in a hidden input - the input name needs to match.

Please be careful; some of the things you are doing here may damage your site. You need to be very very cautious in making direct changes to tables like jos_user!! It is important that you know exactly what you are doing.

Bob
This topic is locked and no more replies can be posted.