Hi Guys,
I was wondering how do i create a link on the main menu such that registered users are able to edit their profiles. i have setup and enabled the profile plugin like this index.php?option=com_chronocontact&chronoformname=registration&user_id=64 and it works, my only problem is that anyone can guess a user id and have access to other isers information.
Does anyone have a clue on how to do this or atleast direct me to somewhere i can get help,
Cheers
James
Hi James,
I think that if you leave "Request parameter name" empty in the Profile Page plug-in configuration then it will default to the User ID. This way you should be able to use a generic menu link and the current User Id will effectively be auto-completed.
Bob
Thanks Greyhead,
Am not understanding what you mean, i left the request parameter blank then selected chronoforms as the menu type but it says "You can not re-register while you are already signed in" when i click on the menu, what am i missing?
Hi cf_jamo,
That message sounds as though you have the Joomla! Registration plug-in enabled?
Bob
yes the joomla plugin is enabled thus the purpose for the profile plugin, in order to enable registered user to edit their own details. i would buy you a beer greyhead if your coming to Kenya this time of year since we are enjoying a lot of sun, its like 2:20 AM when am writing this and its 15c....
anyway i would really appreciate if you direct me in the right direction.😀
Thanks alot greyhead,
I got it working!😀 whenever your in this part of Africa holler at me, i owe you a crate of beer.
Hi Greyhead,
right now i have the same problem as described above. I created a form which will show the user details after login so that the user can edit them by himself. If i enter in 'Request' parameter name
the ID of an existing user all the data are shown. But i also want this to happen dynamically.
What do you mean with "generic menu link"
Regards David
Hi
solved: In my case the id was the problem. I just searched in the profil plugin file (cf_profile.php)
the code section:
} else {
$record_id = $my->id;
if ( $record_id == 0 ) {
//$record_id = '##guest##';
}
and add the red code:
} else {
$record_id = $my->id;
echo "$record_id";
if ( $record_id == 0 ) {
//$record_id = '##guest##';
}
so after reloading the page you will see which "id" is used to identify the record. Finally found my bug in "profil page" plugin settings. I choosed the wrong "Target field name".
I hope its ok if i post changes in the code to debug a problem otherwise please delete this post.
Thanks for this cool component!!
Now 1 prob. is left: Changes in the record data won't be saved to the database?
Hi Bernoe,
Eh? What says that the form input is invalid?
Bob