- Posts: 30
COMMUNITY FORUM
Importing Users then assigning k2 groups
- Omar Ramos
- Offline
- Junior Member
Less
More
14 years 9 months ago #74464
by Omar Ramos
Replied by Omar Ramos on topic Importing Users then assigning k2 groups
Hi GreenDome,
I was going to say that you could follow the instructions that the previous posters made in order to change the group assignment for users that are already in your database, but then I just decided to add an onLoginUser event to the K2 User plugin.
What this event does is it checks the user after they have logged in to see if a K2 User Record already exists for the user or not. If there isn't one, then it will add them into the appropriate group. If they have one then it just continues on.
The way I made my initial changes meant that the group assignment would only work for NEW users, and not for existing ones, but now with this change it should work for both automatically, foregoing the need to open up phpMyAdmin and running the queries mentioned by the previous posters.
I was going to say that you could follow the instructions that the previous posters made in order to change the group assignment for users that are already in your database, but then I just decided to add an onLoginUser event to the K2 User plugin.
What this event does is it checks the user after they have logged in to see if a K2 User Record already exists for the user or not. If there isn't one, then it will add them into the appropriate group. If they have one then it just continues on.
The way I made my initial changes meant that the group assignment would only work for NEW users, and not for existing ones, but now with this change it should work for both automatically, foregoing the need to open up phpMyAdmin and running the queries mentioned by the previous posters.
Please Log in or Create an account to join the conversation.
- GreenDome
- Offline
- Premium Member
Less
More
- Posts: 93
14 years 9 months ago #74465
by GreenDome
Replied by GreenDome on topic Importing Users then assigning k2 groups
Hi Omar,
I appreciate the updated version - thank you.
Just one small one question :) Do i need to change anything in the k2.php file to set my new default group?
Many Thanks
GD
Omar Ramos said:Hi GreenDome,
I was going to say that you could follow the instructions that the previous posters made in order to change the group assignment for users that are already in your database, but then I just decided to add an onLoginUser event to the K2 User plugin.
What this event does is it checks the user after they have logged in to see if a K2 User Record already exists for the user or not. If there isn't one, then it will add them into the appropriate group. If they have one then it just continues on.
The way I made my initial changes meant that the group assignment would only work for NEW users, and not for existing ones, but now with this change it should work for both automatically, foregoing the need to open up phpMyAdmin and running the queries mentioned by the previous posters.
I appreciate the updated version - thank you.
Just one small one question :) Do i need to change anything in the k2.php file to set my new default group?
Many Thanks
GD
Omar Ramos said:Hi GreenDome,
I was going to say that you could follow the instructions that the previous posters made in order to change the group assignment for users that are already in your database, but then I just decided to add an onLoginUser event to the K2 User plugin.
What this event does is it checks the user after they have logged in to see if a K2 User Record already exists for the user or not. If there isn't one, then it will add them into the appropriate group. If they have one then it just continues on.
The way I made my initial changes meant that the group assignment would only work for NEW users, and not for existing ones, but now with this change it should work for both automatically, foregoing the need to open up phpMyAdmin and running the queries mentioned by the previous posters.
Please Log in or Create an account to join the conversation.
- Omar Ramos
- Offline
- Junior Member
Less
More
- Posts: 30
14 years 9 months ago #74466
by Omar Ramos
Replied by Omar Ramos on topic Importing Users then assigning k2 groups
Just open up the K2 user plugin within the Joomla backend so you can choose the group you want to use as the default...that should do the trick for setting the default group.
GreenDome said:Hi Omar,
I appreciate the updated version - thank you.
Just one small one question :) Do i need to change anything in the k2.php file to set my new default group?
Many Thanks
GD
Omar Ramos said:Hi GreenDome, I was going to say that you could follow the instructions that the previous posters made in order to change the group assignment for users that are already in your database, but then I just decided to add an onLoginUser event to the K2 User plugin.
What this event does is it checks the user after they have logged in to see if a K2 User Record already exists for the user or not. If there isn't one, then it will add them into the appropriate group. If they have one then it just continues on.
The way I made my initial changes meant that the group assignment would only work for NEW users, and not for existing ones, but now with this change it should work for both automatically, foregoing the need to open up phpMyAdmin and running the queries mentioned by the previous posters.
GreenDome said:Hi Omar,
I appreciate the updated version - thank you.
Just one small one question :) Do i need to change anything in the k2.php file to set my new default group?
Many Thanks
GD
Omar Ramos said:Hi GreenDome, I was going to say that you could follow the instructions that the previous posters made in order to change the group assignment for users that are already in your database, but then I just decided to add an onLoginUser event to the K2 User plugin.
What this event does is it checks the user after they have logged in to see if a K2 User Record already exists for the user or not. If there isn't one, then it will add them into the appropriate group. If they have one then it just continues on.
The way I made my initial changes meant that the group assignment would only work for NEW users, and not for existing ones, but now with this change it should work for both automatically, foregoing the need to open up phpMyAdmin and running the queries mentioned by the previous posters.
Please Log in or Create an account to join the conversation.
- GreenDome
- Offline
- Premium Member
Less
More
- Posts: 93
14 years 9 months ago #74467
by GreenDome
Replied by GreenDome on topic Importing Users then assigning k2 groups
Excellent! - thank you very much!
GD
Omar Ramos said:Just open up the K2 user plugin within the Joomla backend so you can choose the group you want to use as the default...that should do the trick for setting the default group.
GreenDome said:Hi Omar, I appreciate the updated version - thank you.
Just one small one question :) Do i need to change anything in the k2.php file to set my new default group?
Many Thanks
GD
Omar Ramos said:Hi GreenDome, I was going to say that you could follow the instructions that the previous posters made in order to change the group assignment for users that are already in your database, but then I just decided to add an onLoginUser event to the K2 User plugin.
What this event does is it checks the user after they have logged in to see if a K2 User Record already exists for the user or not. If there isn't one, then it will add them into the appropriate group. If they have one then it just continues on.
The way I made my initial changes meant that the group assignment would only work for NEW users, and not for existing ones, but now with this change it should work for both automatically, foregoing the need to open up phpMyAdmin and running the queries mentioned by the previous posters.
GD
Omar Ramos said:Just open up the K2 user plugin within the Joomla backend so you can choose the group you want to use as the default...that should do the trick for setting the default group.
GreenDome said:Hi Omar, I appreciate the updated version - thank you.
Just one small one question :) Do i need to change anything in the k2.php file to set my new default group?
Many Thanks
GD
Omar Ramos said:Hi GreenDome, I was going to say that you could follow the instructions that the previous posters made in order to change the group assignment for users that are already in your database, but then I just decided to add an onLoginUser event to the K2 User plugin.
What this event does is it checks the user after they have logged in to see if a K2 User Record already exists for the user or not. If there isn't one, then it will add them into the appropriate group. If they have one then it just continues on.
The way I made my initial changes meant that the group assignment would only work for NEW users, and not for existing ones, but now with this change it should work for both automatically, foregoing the need to open up phpMyAdmin and running the queries mentioned by the previous posters.
Please Log in or Create an account to join the conversation.
- Dave Smith
- Offline
- New Member
Less
More
- Posts: 12
14 years 9 months ago #74468
by Dave Smith
Replied by Dave Smith on topic Importing Users then assigning k2 groups
Omar, Brilliant, thanks! Just what I was looking for. I was using Community Builder's login and needed this to update the K2 user group.
Omar Ramos said:Hi GreenDome,
I was going to say that you could follow the instructions that the previous posters made in order to change the group assignment for users that are already in your database, but then I just decided to add an onLoginUser event to the K2 User plugin.
What this event does is it checks the user after they have logged in to see if a K2 User Record already exists for the user or not. If there isn't one, then it will add them into the appropriate group. If they have one then it just continues on.
The way I made my initial changes meant that the group assignment would only work for NEW users, and not for existing ones, but now with this change it should work for both automatically, foregoing the need to open up phpMyAdmin and running the queries mentioned by the previous posters.
Omar Ramos said:Hi GreenDome,
I was going to say that you could follow the instructions that the previous posters made in order to change the group assignment for users that are already in your database, but then I just decided to add an onLoginUser event to the K2 User plugin.
What this event does is it checks the user after they have logged in to see if a K2 User Record already exists for the user or not. If there isn't one, then it will add them into the appropriate group. If they have one then it just continues on.
The way I made my initial changes meant that the group assignment would only work for NEW users, and not for existing ones, but now with this change it should work for both automatically, foregoing the need to open up phpMyAdmin and running the queries mentioned by the previous posters.
Please Log in or Create an account to join the conversation.