Register new user as Author

13 years 7 months ago #8763 by bzn
i would like to differentiate between two user groups: "registered" and "author". i would like to modify the login module to point to a second comprofiler.php (comprofiler2.php). i want the comprofiler2.php to use the author registration routine ($row->gid = $acl->get_group_id('Author','ARO'); )

but now my question is: what do i need to change in the login module to let it point to the comprofiler2.php ?

i think the definition for call for the registration is:
$loginPost = sefRelToAbs("index.php?option=com_comprofiler&task=registers");

obviously the component is called, but how can i then manage to call comprofiler2.php ?

thx for your ideas!

________________________________________
I'm running Joomla v1.5.5 and CB v1.1
13 years 7 months ago #9129 by bzn
is it possible to call the CB component with a direkt link?
for example: is there another way to call the user list with another url than: /index.php?option=com_comprofiler&task=usersList&Itemid=XYZ

??

________________________________________
I'm running Joomla v1.5.5 and CB v1.1
13 years 7 months ago #9146 by mikko
You need to install opensef or some other url rewriting component to get custom urls.

Having two comprofilers is not supported option. If you want to register users as authors, the best way is to write a plugin. This is propably the fastest way also.

-Mikko
13 years 6 months ago #11265 by natsirtm
thanks for pointing this out.

i added some checking to help monitor new registrations. right now it just looks for 'spam' anywhere in the name, username or email fields.

[code:1]
/* START OF USER REGISTRATION CHANGES
Altering some new user registration defaults
*/

// check vs. details for suspicious registration
// check 1
if (
// change the if statement to vary your check.
preg_match ("/spam/i", $_POST) || preg_match ("/spam/i", $_POST) || preg_match ("/spam/i", $_POST)
) {
// apply registered user group.
$row->gid = $acl->get_group_id('Registered','ARO');

/* UNCOMMENT THIS BLOCK TO ADD IF/ELSE
// check 1+
} ifelse (
// add if/else statements to use multiple checks.

) {
// apply registered user group.
$row->gid = $acl->get_group_id('Registered','ARO');
}
*/

} else {
// otherwise apply author user group.
$row->gid = $acl->get_group_id('Author','ARO');
}

/*
applies user default group.
$row->gid = $acl->get_group_id('Registered','ARO');
END OF USER REGISTRATION CHANGES
*/

[/code:1]
13 years 6 months ago #13219 by ericfoster3
petjez wrote:

Change tho following file:
/components/com_profiler/comprofiler.php

Look for the line:
$row->gid = $acl->get_group_id('Registered','ARO');

Change Registered in Author


What does this code change do exactly?

CB 3rd Party Developer: DatsoTab | KarmaTab
Joomla! 1.0.10
Community Builder 1.0
joomlaboard 1.1.2
13 years 2 months ago #20914 by mattpist
it appears that it sets the user group of new users to "author" instead of "Registered". i just tried this on my site, and it works wonderfully! i made a test user (testuser2000) and checked the group in the backend, and yep, the new user defaulted to the "author" group. i even logged in as the test user and tried to post an article, and all went well.

i really think this should be included in the docs, or posted as a "how-to" as lots of people want to be able to do this, but this thread is kinda buried in within everything else.

also, "Change Registered in Author" should be "Change Registered to Author" to avoid any confusion. also, this code is located on line 1749 if anyone is curious :)
Moderators: beatnantkrileon
Time to create page: 0.418 seconds
Facebook Twitter Google LinkedIn