Forums

Change group from 'registered' to 'author'

blaznspadz 20 Dec, 2010
Hi, i just began using chronoforms and absolutely love it.

I set up a registry page but when people register the people go under the group 'registered'. since my site is heavily dependent on registered users who can submit articles i need the default to be "author"

I'd really appreciate it if anyone here can help me out. Thanks in advance.
GreyHead 20 Dec, 2010
Hi blaznspadz,

There's also a "New User Registration Type" setting in the Site Global Configuration if you want all new registrants to be authors.

Bob
blaznspadz 21 Dec, 2010
Fredrik,

i took a look at the thread but to know avail. is there any other way you can help? i really would not want to go back to the default registry system. thanks
nml375 21 Dec, 2010
Hi,
You could try Bob's suggestion, or try to tweak this code (from the other thread). Keep in mind that it has to be used within the "extra after registration code" within the registration plugin setup, not the "on submit" - code in the actual form:
<?php
$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('', 'Author', 'ARO'));
if (!$user->save()) {
  JError::raiseWarning('', JText::_($user->getError()));
}

print_r($post);
?>


/Fredrik
blaznspadz 21 Dec, 2010

Hi,
You could try Bob's suggestion, or try to tweak this code (from the other thread). Keep in mind that it has to be used within the "extra after registration code" within the registration plugin setup, not the "on submit" - code in the actual form:

<?php
$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('', 'Author', 'ARO'));
if (!$user->save()) {
  JError::raiseWarning('', JText::_($user->getError()));
}

print_r($post);
?>


/Fredrik



It's always been set to author, so i'm not sure why it wouldn't work now. When you say "extra after registration code" you mean the extra code part underneath all the html code etc?
nml375 21 Dec, 2010
Hi,
No. As I said, it's in the registration plugin setup, not the form setup.

/Fredrik
blaznspadz 21 Dec, 2010
where would i find that? i searched for it in the plugins section but didn't find anything pertaining to registration at all.
nml375 21 Dec, 2010
Hi,
In the Forms Management, check the checkbox for the form in question, then click the "Joomla Registration" link to the left (in the area labelled "Plugins"); this is the registration plugin setup.

/Fredrik
blaznspadz 22 Dec, 2010
Thank you. One last issue.

When I successfully register (which now is Author) and the site tells me this

Your account has been created and an activation link has been sent to the e-mail address you entered. Note that you must activate the account by clicking on the activation link when you get the e-mail before you can login.



Right after it is

.Array ( [text_0] => NAME [text_1] => USERNAME [text_5] => PASSWORD [text_4] => PASSWORD [text_2] => [email]EMAIL@ADDRESS.COM[/email] [check0] => Array ( [0] => By clicking 'Register' below you are agreeing to SITE Terms of Service, and Privacy Policy. ) [chrono_verification] => uc7qa [button_17] => Register [2bda2a41d968efba886ce60521252784] => 1 [1cf1] => b48b8be7b98863feb4a01ced0281b95c [chronoformname] => Register [username] => USERNAME [name] => NAME[email] => EMAIL ADDRESS [password] => PASSWORD [password2] => PASSWORD )

GreyHead 22 Dec, 2010
Hi blaznspadz ,

You need to comment out or delete this line of debug code
print_r($post);


Bob
blaznspadz 24 Dec, 2010
worked like a charm thank you all for your help.
This topic is locked and no more replies can be posted.