ghanja.be
NederlandsEnglish
Contact Us

Ghanja
Welkom, Gast
Alstublieft Inloggen of Registreren.    Wachtwoord verloren?
Re:Add basic K2 user support (1 bezoeker) (1) Gast
Ga naar onderkant Reageer Favoriet: 0
TOPIC: Re:Add basic K2 user support
#105
ishara (Gebruiker)
Fresh Boarder
Berichten: 1
graphgraph
Gebruiker offline Klik hier om het gebruikersprofiel van deze gebruiker te zien
Add basic K2 user support 1 Jaar, 5 maanden geleden Karma: 0  
Any chance you could add the facility to choose a K2 user group to add this new user to? Then it would be perfect to let my site owner add her clients as K2 users from the front end - a task which eludes me as I'm not a confident php programmer.

regards,
Ishara
 
  De Administrator heeft publieke schrijf toegang geblokkeerd.
#106
Webmaster (Admin)
Administrator
Berichten: 194
graph
Gebruiker offline Klik hier om het gebruikersprofiel van deze gebruiker te zien
Re:Add basic K2 user support 1 Jaar, 5 maanden geleden Karma: 1  
Maybe in the next version... Ill keep you up to date.
 
  De Administrator heeft publieke schrijf toegang geblokkeerd.
#163
Webmaster (Admin)
Administrator
Berichten: 194
graph
Gebruiker offline Klik hier om het gebruikersprofiel van deze gebruiker te zien
Re:Add basic K2 user support 1 Jaar, 1 Maand geleden Karma: 1  
Hey man,
i have progressed in the developpement of the component and i made it possible to make user plugins for Add user frontend.

I have made the first plugin which maybe can help you with your question.

This plugin makes add user frontend work together with K2. When you add a user in add user frontend this plugin will add the user to the K2 userlist and assign it to the user group of your choice.

Attention: You cant choose which user group you want to add the user to in the add user form. You can only configure it in the plugin parameters backend! So on the frontend you will be limited to one user group.

If you want to have a dropdown in the add user form to choose the usergroup you should edit the component. You can make the selectbox in the form yourself and then pass the data on to the plugin with the "onAfterStoreUserAuftoK2" event which looks like this:


// Fire the onAfterStoreUser trigger for K2 synchronization
$dispatcher->trigger('onAfterStoreUserAuftoK2', array($userdataexport, true, true, $this->getError()));


the array: $userdataexport contains the data, so you need to ad your data in it first like for example:


// Get userdata for export

$userdataexport = array (

"username" => "$username",

"email" => "$email",

"name" => "$name",

"password" => "$password",

"id" => "$user_id",

"k2groupid" => "$user_id", <----- adding your data from the form to the array

);

After that you can continue editing the plugin

But this is not an exact tuturial. It can only help you if you have enough knowledge about forms, php, etc..

Why dont i write the code myself?
I will but not in the way i suggested to you. Because i dont want to alter the code of the component. I want it to work from the plugin only. But thats more complicated. So i still need some time for that

The plugins only works with Add userfrontend v1.2.5 and above.

You can download the component here: http://www.ghanja.be/en/downloads/components/add-user-frontend/details.html

And the plugin here: http://www.ghanja.be/en/downloads/k2-user-sync-for-add-user-frontend/details.html

Grtz Kim
 
  De Administrator heeft publieke schrijf toegang geblokkeerd.
Ga naar bovenkant Reageer
Powered by FireBoardbezorg de laatste berichten direct op de desktop
Ghanja Alternatief - Community voor een open wereld!
   
Copyright © 2005 - 2012 Ghanja.be - Sitemap