Forums

K2 Registration Plugin

GoHost4U 27 Apr, 2010
Hi

Great component and once I have this all sorted I will def subscribe BUT...

I want to produce a form that registers in Joomla with extra data like telephone etc (done and working..great so far) but I also want to automate the registration to my K2 users so they can comment. K2 comments allow for anyone, which I dont want, or registered users but its registered users in the K2 Users database so if they are registered in jos_users they appear in jos_K2_users but the field which determines if they are registered or not in k2 is not completed because the registration did not take place using the K2 registration form. I hope this makes sense to someone!

The users are created by the chronoform and both jos_users and jos_k2_users seem populated but when you look in the users part of K2 the user is there but no info for the "Joomla Group" and so the comments does not work.

Manually you can click on a user and then save the user and then all is ok..seems the save then updates jos_K2_users "group" field with a 1 which represents being registered.

My question...is it possible to get a K2 plugin like CB or is there another solution?

Thanks in advance and sorry if the description is not brilliant but its late!

Mark
GreyHead 28 Apr, 2010
Hi Mark,

What is K2?

Bob
GoHost4U 28 Apr, 2010
Hi

K2 - "It provides an out-of-the box integrated solution featuring rich content forms for items (think of Joomla! articles with additional fields for article images, videos, image galleries and attachments), nested-level categories, tags, comments, a system to extend the item base form with additional fields (similar to CCK for those acquainted with Drupal), a powerful plugin API to extend item, category and user forms, ACL, frontend editing, sub-templates and a lot more!"

http://community.getk2.org/

It has its own user login module which includes some extra fields and it also populates the Joomla user.

If you do not use the K2 registration module the users are populated into both but as joomla registration does not get information about the user group (K2Registered or not) this then prevents commenting as K2 looks at its own user database (jos_K2_users) and sees the user does not have a "1" in jos_K2_users, group field and thus thinks the user is not registered and blocks commenting.

I have noticed a K2 user plugin which says this is used to synchronise users but I think this is when you use the K2 registration module.

To complicate matters I use a small extension which allows Email verification by user as well as admin approval called JoomlaXi Admin Approval Plugin 2.0.37. Which intercepts the registration process and sends an email to the administrator to confirm the acceptance of the new registration.

All is working together except after admin approval I need to update the user record in the jos_K2_users, group field to a "1"

Thanks again

Mark
GoHost4U 04 May, 2010
Hi

Anyone got a solution to this?
GreyHead 04 May, 2010
Hi Mark,

No detailed idea but it sounds as though adding a little snippet to the After Registration box in the Joomla Registrsation plugin to update that field might be a workaround?

Bob
GoHost4U 04 May, 2010
Hi

Thanks again for your help!

I think that could work as all I need to do (in theory) is to update a field in the jos_K2_users table for the user that has just been registered. Trouble is how?

Mark
GreyHead 06 May, 2010
Hi Mark,

You can add the MySQL query into the OnSubmit After code box. The code will be something like
<?php
$db =& JFactory::getDBO():
$query = "
  UPDATE `jos_K2_users`
    SET `group` = '1'
    WHERE `some_other_column` = 'some_other_value' ;
";
$db->setQuery($query);
$db->query();
?>

Bob
GoHost4U 07 May, 2010
Hi

Thanks again for the reply...

Unfortunately this didnt work...

seems the user record is not written to the jos_K2_users table UNTIL after you enter into the K2 user admin area.

I think I am going to come about this from the other way...If the only reason I need this is to allow or not allow commenting and the K2 commenting system checks to see if you are a valid user or not I should be able to find where K2 does this check on jos_K2_users and send it looking at jos_users instead.

Does this seem feasible?

Thanks again.

Mark
ocean 13 Jul, 2011
Is there already a solution to connect chronoform user registration with K2 users
I also want to update K2 user after registration with chronoform
GreyHead 13 Jul, 2011
Hi ocean,

I don't remember seeing a solution posted here :-(

Bob
GoHost4U 13 Jul, 2011
If you contact me I have a solution!
ocean 19 Jul, 2011
Is there someone how can post a solution?
Maybe GoHost4U can post the solution?
GoHost4U 19 Jul, 2011

Is there someone how can post a solution?
Maybe GoHost4U can post the solution?



After hours trying to sort this I have moved away from Chrono...this is why my solution wont solve this directly but depending on what you want to do I may be able to help.

Explain what you are doing with Chrono forms and I will see.
ocean 19 Jul, 2011
Hi GoHost4U,

Thanks for responding to my question.

I have made a registation form with the following fields:
- name
- email
- password
- company
- description
- activities

those last fields need to be added to K2 articles
company = k2-title
description = k2-content
activities = k2-extraFields
ocean 11 Jan, 2012
I still can't find out how to solve this problem.
Any one :?
GreyHead 11 Jan, 2012
Hi ocean,

Sorry, I've no idea and I haven't looked at K2 for months and months :-(

Bob
assenzio 23 Mar, 2012
Hello, I am using the 2.5.4 version but I still have problem. Maybe is my fault. I have created my new fields in chronoforms. Connected the form to the jos_k2_users database. But still when I insert the data into the form live it doesn't populate the k2_users database. Question: how I can modify the fields in the k2_users database so it accept the new fields from my chronoform ?
This topic is locked and no more replies can be posted.