JUSER - User ID field

keianrad

Member
I added JUSER plugin to a form, when the form submited new user created but userid didn't record in database of from that I chose in User ID field in juser plugin setting!!
 
How did you define your UserID field?
Note if you want to update the Joomla user associated with the form's record when you edit the form's data you must supply a field (type field or dbjoin) in the "User ID field"
http://fabrikar.com/forums/index.php?wiki/joomla-user-form-plugin/

The field holding the userID must not be the primary key (usually "internal id") of your list and it must not be a "user" plugin element.
 
You have set element access form(add) to registered.
So a new user (which doesn't exist at this moment and is not logged) in doesn't have access to this element, so the userid can't be written.
 
I changed it to the public, But it doesn't work yet.

You have set element access form(add) to registered.
So a new user (which doesn't exist at this moment and is not logged) in doesn't have access to this element, so the userid can't be written.
 
Last edited:
I can't get in to look because of the htaccess. Either set that password to the same as the admin one we use, or disable it, until we're done with this issue.

I can't replicate the problem here, the userid gets set OK in my juser tests, so it has to be something with your setup, so I need to log in.

-- hugh
 
It is disable right now. try it now. Thanks

I can't get in to look because of the htaccess. Either set that password to the same as the admin one we use, or disable it, until we're done with this issue.

I can't replicate the problem here, the userid gets set OK in my juser tests, so it has to be something with your setup, so I need to log in.

-- hugh
 
I'm trying to submit the form to test it, but the "Major" dropdown has a validation on it and no options.

-- hugh
 
Sorry for that, because it is a multilingual website, some EN language parts are not completed. I solved this issue. I have added link of form in frontpage also on my website info.


I'm trying to submit the form to test it, but the "Major" dropdown has a validation on it and no options.

-- hugh
 
You had disabled the juser plugin. "Published" was set to "No".

I enabled it, it seems to work.

You might want to delete the two test rows I created, and the one user.

Oh, and I changed the access on the id>0 prefilter on that list to "Special" instead of "Super Admins" so I could see rows in the list, you'll probably want to set that bac as well.

-- hugh
 
The way to do that is to link to the form from a menu item, with the advanced settings as rowid=-2 and usekey=userid (or whatever your userid element is called). That way, if the user already has a row in that list (so there's a row with the userid element set to their logged on ID), it displays that, and they can edit their settings. If there isn't a row with their userid, a new form is opened, and a new user created.

If that isn't what you want, and if you don't need them to be able to edit their settings, then you could add a "Condition" (under Options) of something like ...

Code:
return JFactory::getUser()->guest;

... which will prevent the plugin from running if they are logged in. But that means the form can't be used to edit settings. Well, I guess you could probably modify that condition a little ...

Code:
$myUser = JFactory::getUser();
return $myUser->guest || $myUser->get('id') == $formModel->formData['yourtable___userid_raw'];

Replace 'yourtable___userid_raw' with the full element name (with _raw appended) of your userid element.

That's let the plugin run if they are not logged in, or if this is "their" row on edit.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top