How to activate a user after registration using:
Event “Joomla User Registration” with a ChronoForms Formular
Event “Joomla User Registration” with a ChronoForms Formular
Hi Hansueli,
How do you want to activate the User? The 'normal' method is to use the Joomla! email verification link so the user activates themselves. You could use a custom link back to another form event and then email a second link to an Admin if you want Admin approved validation. You could use some kind of a form to let an Admin activate users without Email verification.
Bob
How do you want to activate the User? The 'normal' method is to use the Joomla! email verification link so the user activates themselves. You could use a custom link back to another form event and then email a second link to an Admin if you want Admin approved validation. You could use some kind of a form to let an Admin activate users without Email verification.
Bob
I have a side with about 1000 Members in 20 countries.
It is only allowed to register a new user if you are one of the 20 Country- Manager.
So if a Manager inserts a new user then it has to be activated immediately.
I have now a form to register a new user.
now I think I try to activate it just after Registration in a custom code like you showed me:
$query = "UPDATE #__users SET #__users.activation = '', #__users.block = 0 WHERE #__users.id=10040;";
echo $query ."<br><br>";
$db->setQuery($query);
$db->execute()
So I have to find how to access the #__users.id
[attachment=0]customcode.jpg[/attachment]
It is only allowed to register a new user if you are one of the 20 Country- Manager.
So if a Manager inserts a new user then it has to be activated immediately.
I have now a form to register a new user.
now I think I try to activate it just after Registration in a custom code like you showed me:
$query = "UPDATE #__users SET #__users.activation = '', #__users.block = 0 WHERE #__users.id=10040;";
echo $query ."<br><br>";
$db->setQuery($query);
$db->execute()
So I have to find how to access the #__users.id
[attachment=0]customcode.jpg[/attachment]
Hi Hansueli,
Please try setting User Activation to No in the Joomla! Registration action. I think this will automatically activate the user.
Bob
Please try setting User Activation to No in the Joomla! Registration action. I think this will automatically activate the user.
Bob
:D
For me I am using also the community builder so I have to set in
community builder
- configuration
-- Registration:
--- Require Admin Approval: NO
--- Require Email Confirmation: No
Now I can Register a user
Then log in the first time and it fails but the second time I can log in as the new user.
This is no Problem
Thank you!
Now I like to set the Usertype in the
“Joomla Function”
“ Joomla User Registration”
depending how is registering the user.
As example:
If the user registering a new user is: “A-CH” the the Userttype is 10
If the user registering a new user is: “A-DE” the the Userttype is 11
I can do this with a table to look at.
What is the best way of reading ma user name?
And how can I modify the content of the Array
[joomla_registration] => Array
(
[*isRoot] =>
….
[groups] => Array
(
[0] => 10
)
Hansueli
For me I am using also the community builder so I have to set in
community builder
- configuration
-- Registration:
--- Require Admin Approval: NO
--- Require Email Confirmation: No
Now I can Register a user
Then log in the first time and it fails but the second time I can log in as the new user.
This is no Problem
Thank you!
Now I like to set the Usertype in the
“Joomla Function”
“ Joomla User Registration”
depending how is registering the user.
As example:
If the user registering a new user is: “A-CH” the the Userttype is 10
If the user registering a new user is: “A-DE” the the Userttype is 11
I can do this with a table to look at.
What is the best way of reading ma user name?
And how can I modify the content of the Array
[joomla_registration] => Array
(
[*isRoot] =>
….
[groups] => Array
(
[0] => 10
)
Hansueli
Found how to get user and read in a new table("adminof_create_user_in_group"):
<?php
// Get user-information from Joomla
$user = &JFactory::getUser();
echo " will user id lesen und schreiben:<br>";
echo $user ->name ;
Echo "<br> ---- <br>";
$db =& JFactory::getDBO();
$query = "
SELECT adminof_create_user_in_group.title, adminof_create_user_in_group.group_id FROM adminof_create_user_in_group WHERE adminof_create_user_in_group.username= '" . $user ->name. "';";
$db->setQuery($query);
$data = $db->loadAssoc();
$gr = $data['group_id'];
$ti = $data['title'];
echo "***:" . $data ."-*-<br>++gr: ". $gr ." --<br>ti: ". $ti ." --<br>";
?>
So I have to finde out:
how can I modify the content of the Array to Register to the correct Group?
<?php
// Get user-information from Joomla
$user = &JFactory::getUser();
echo " will user id lesen und schreiben:<br>";
echo $user ->name ;
Echo "<br> ---- <br>";
$db =& JFactory::getDBO();
$query = "
SELECT adminof_create_user_in_group.title, adminof_create_user_in_group.group_id FROM adminof_create_user_in_group WHERE adminof_create_user_in_group.username= '" . $user ->name. "';";
$db->setQuery($query);
$data = $db->loadAssoc();
$gr = $data['group_id'];
$ti = $data['title'];
echo "***:" . $data ."-*-<br>++gr: ". $gr ." --<br>ti: ". $ti ." --<br>";
?>
So I have to finde out:
how can I modify the content of the Array to Register to the correct Group?
This topic is locked and no more replies can be posted.