Register new user as Author

18 years 3 weeks ago #8763 by bzn
Replied by bzn on topic Re:Register new user as Author
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

Please Log in to join the conversation.

18 years 3 weeks ago #9129 by bzn
Replied by bzn on topic Re:Register new user as Author
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

Please Log in to join the conversation.

18 years 3 weeks ago #9146 by mikko
Replied by mikko on topic Re:Register new user as Author
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

Please Log in to join the conversation.

17 years 11 months ago #11265 by natsirtm
Replied by natsirtm on topic Re:Register new user as Author
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]

Please Log in to join the conversation.

17 years 11 months ago #13219 by ericfoster3
Replied by ericfoster3 on topic Re:Register new user as Author
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

Please Log in to join the conversation.

17 years 7 months ago #20914 by mattpist
Replied by mattpist on topic Re:Register new user as Author
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 :)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.241 seconds

Facebook Twitter LinkedIn