Is it possible to call a ChoronoConnectivity Connection with an option from a Chronoform.
Something like this:
http://localhost/beheer25/index.php/component/chronoconnectivity/beheer2/cc_edit_data/User ID
I have a custom code with:
<?php
$user =& JFactory::getUser();
$form->data['id'] = $user->id;
?>
Rob
Something like this:
http://localhost/beheer25/index.php/component/chronoconnectivity/beheer2/cc_edit_data/User ID
I have a custom code with:
<?php
$user =& JFactory::getUser();
$form->data['id'] = $user->id;
?>
Rob
Hi Rob,
You can certainly pass a value by adding a parameter name and value to the URL like this:
You could then get the value with
Bob
You can certainly pass a value by adding a parameter name and value to the URL like this:
http://localhost/beheer25/index.php/component/chronoconnectivity/beheer2/cc_edit_data?user_id=999
You could then get the value with
<?php
$user_id =& JRequest::getInt('user_id', '', 'get');
?>
Bob
I don't want to pass a varable but make an URL with the user ID.
If the user ID is 515 I want to redirect the user to the URL:
index.php/component/chronoconnectivity/beheer2/cc_edit_data/515
Is that possible with a ReDirect URL event?
Or a PHP script like;
<?php
$user =& JFactory::getUser();
header("Location: index.php/component/chronoconnectivity/beheer2/cc_edit_data/echo .$user->id.");
?>
The last part of the URL is not right.
Rob
If the user ID is 515 I want to redirect the user to the URL:
index.php/component/chronoconnectivity/beheer2/cc_edit_data/515
Is that possible with a ReDirect URL event?
Or a PHP script like;
<?php
$user =& JFactory::getUser();
header("Location: index.php/component/chronoconnectivity/beheer2/cc_edit_data/echo .$user->id.");
?>
The last part of the URL is not right.
Rob
Hi Rob,
Please try:
Bob
Please try:
<?php
$user =& JFactory::getUser();
$app =& JFactory::getApplication();
$app->redirect(JURI::root().'index.php/component/chronoconnectivity/beheer2/cc_edit_data/'.$user->id);
?>
Bob
Thanks Bob,
It works perfect!!!
I forgot the JFactory part.
I do have an other question, not code related.
I'm building an ergonomics site.
The employees get a email with login and password so they can fill in a form with questions about their work environment. They can only access the public site and change their own information.
Would it be a great risk if I put their passwords in plain text in the employee table?
Rob
It works perfect!!!
I forgot the JFactory part.
I do have an other question, not code related.
I'm building an ergonomics site.
The employees get a email with login and password so they can fill in a form with questions about their work environment. They can only access the public site and change their own information.
Would it be a great risk if I put their passwords in plain text in the employee table?
Rob
Hi Rob,
In reality probably not, but if something goes wrong then it will be labelled as a big mistake.
If it's a Joomla! 2.5/3 site then why not make a special User Group just for that form and use the Joomla! User methods to manage the usernames and passwords.
Bob
In reality probably not, but if something goes wrong then it will be labelled as a big mistake.
If it's a Joomla! 2.5/3 site then why not make a special User Group just for that form and use the Joomla! User methods to manage the usernames and passwords.
Bob
Using Joomla to manage the users is my setup now.
It has some problems I would like to avoid.
My site (s) will be used by civil servants, we have a lot of them in the Netherlands.
I use their employee number as username , and a generated password.
Most of them forget their password, supplying a new one is not that easy.
Garbage collectors don't seem to have or use a company email address.
An other problem is that they may get their number wrong and reset an other employee's password.
An alternative is keeping the usernames an passwords in a separate file.
Since I will load the user data from a CSV file this will work for the initial setup.
When adding new employees it requires some administration.
Rob
It has some problems I would like to avoid.
My site (s) will be used by civil servants, we have a lot of them in the Netherlands.
I use their employee number as username , and a generated password.
Most of them forget their password, supplying a new one is not that easy.
Garbage collectors don't seem to have or use a company email address.
An other problem is that they may get their number wrong and reset an other employee's password.
An alternative is keeping the usernames an passwords in a separate file.
Since I will load the user data from a CSV file this will work for the initial setup.
When adding new employees it requires some administration.
Rob
Hi Rob,
I guess that would work but I'm not clear how it avoids the problems with the present system? I guess that Emails are no longer needed - but with the present system you can auto-generate a unique email address and turn off validation.
Bob
I guess that would work but I'm not clear how it avoids the problems with the present system? I guess that Emails are no longer needed - but with the present system you can auto-generate a unique email address and turn off validation.
Bob
Calling the edit form through:
<?php
$user =& JFactory::getUser();
$app =& JFactory::getApplication();
$app->redirect(JURI::root().'index.php/component/chronoconnectivity/medewerkers/cc_edit_data/'.$user->id);
?>
Does have a problem.
When I submit the form the user is redirected to the Chronoconnectivity listing.
Is it possible to redirect the somewhere else, or just close the form?
Rob
<?php
$user =& JFactory::getUser();
$app =& JFactory::getApplication();
$app->redirect(JURI::root().'index.php/component/chronoconnectivity/medewerkers/cc_edit_data/'.$user->id);
?>
Does have a problem.
When I submit the form the user is redirected to the Chronoconnectivity listing.
Is it possible to redirect the somewhere else, or just close the form?
Rob
This topic is locked and no more replies can be posted.