- Posts: 19
- Thank you received: 0
values in registration form
- Sven Kutz
- Topic Author
- Offline
- New Member
-
Less
More
4 years 2 months ago #145239
by Sven Kutz
values in registration form was created by Sven Kutz
Hi Tuam,
I have another question.
On my Site visitors can first register normal via Joomla Registration. In case a registered member is logged in, this member would be able to buy something like a "premium membership". The premium memberships are managed via your extension "Membership Pro", so I have setup 4 different plans for this. Also I have setup some custom fields in Membership Pro for the plan registration (e. g. Name, Address, Email, etc. just the usual stuff). I wonder now if it is possible to get the Joomla user details of a logged in person (via $user = JFactory::getUser()
and use some of those values/details as standard for some of the custom fields (e.g. email adress).
Thanks for your support.
Sven
I have another question.
On my Site visitors can first register normal via Joomla Registration. In case a registered member is logged in, this member would be able to buy something like a "premium membership". The premium memberships are managed via your extension "Membership Pro", so I have setup 4 different plans for this. Also I have setup some custom fields in Membership Pro for the plan registration (e. g. Name, Address, Email, etc. just the usual stuff). I wonder now if it is possible to get the Joomla user details of a logged in person (via $user = JFactory::getUser()

Thanks for your support.
Sven
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
4 years 2 months ago #145243
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic values in registration form
Hi Sven
Where do you want to get these details to use? In your custom PHP code? Or exactly where?
Tuan
Where do you want to get these details to use? In your custom PHP code? Or exactly where?
Tuan
Please Log in or Create an account to join the conversation.
- Sven Kutz
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
4 years 2 months ago #145262
by Sven Kutz
Replied by Sven Kutz on topic values in registration form
Hi Tuan,
I just want to use the details of the logged in user as standard values of the custom fields in the subscription form.
E.G.
Custom Field (username) = Standard value (<input value="$user->username">)
Custom Field (email) = Standard value (<input value="$user->email">)
... and so on...
Hope this clarifies what I would like to reach.
I just want to use the details of the logged in user as standard values of the custom fields in the subscription form.
E.G.
Custom Field (username) = Standard value (<input value="$user->username">)
Custom Field (email) = Standard value (<input value="$user->email">)
... and so on...
Hope this clarifies what I would like to reach.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
4 years 1 month ago #145265
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic values in registration form
Hello
1. The username of the logged in user will be used as the username of subscriber, so I guess no need to do anything
2. The email of the logged in user will be used to populate email field on subscription form
3. For other fields, you can use this plugin membershipprodoc.joomservices.com/integr...#joomla-user-profile to map fields between Joomla user profile and the fields on subscription form
Regards,
Tuan
1. The username of the logged in user will be used as the username of subscriber, so I guess no need to do anything
2. The email of the logged in user will be used to populate email field on subscription form
3. For other fields, you can use this plugin membershipprodoc.joomservices.com/integr...#joomla-user-profile to map fields between Joomla user profile and the fields on subscription form
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Sven Kutz
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
4 years 1 month ago - 4 years 1 month ago #145278
by Sven Kutz
Replied by Sven Kutz on topic values in registration form
Hi Tuan,
Many thanks for your support so far!
1. I have double checked MySQL Subscribers table. There is indeed a column to safe username of Joomla core. However, for my test subscribers there are no value saved in that column. So every record have value NULL in column username. Can you please tell me how can I change this?
2. Brilliant! This makes some things much easier for me. Just another question: Will this also be saved in case email form field is hidden? If not, is there any chance to make this field readonly to not allow the subscriber to change the email address?
3. Brilliant!Thanks for the information. In case there are some other information saved in another table which has nothing to do with Joomla core, there is probably no chance to use such information as values for custom fields, right? e. g. I have saved address in another table and would like to use this as standard value for custom field "address" in the subscription form. This is probably not possible, right? An individual plugin would probably be required, right?
Many thanks for your support so far!
1. I have double checked MySQL Subscribers table. There is indeed a column to safe username of Joomla core. However, for my test subscribers there are no value saved in that column. So every record have value NULL in column username. Can you please tell me how can I change this?
2. Brilliant! This makes some things much easier for me. Just another question: Will this also be saved in case email form field is hidden? If not, is there any chance to make this field readonly to not allow the subscriber to change the email address?
3. Brilliant!Thanks for the information. In case there are some other information saved in another table which has nothing to do with Joomla core, there is probably no chance to use such information as values for custom fields, right? e. g. I have saved address in another table and would like to use this as standard value for custom field "address" in the subscription form. This is probably not possible, right? An individual plugin would probably be required, right?
Last edit: 4 years 1 month ago by Sven Kutz.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
4 years 1 month ago #145279
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic values in registration form
Hello
1. Actually, username of the account should be stored in Joomla core #__users table. In the #__osmembership_subscribers table, we just store ID of the user account into user_id column. And base on that, we can easily get username of the account if needed
2. You should only make the field readonly, I think. And please keep in mind that in this case, the subscription form should only be available for logged in user only.
3. Yes. In that case, you would need a plugin to populate form fields data. You can write a new plugin for that purpose base on the existing user profile plugin if needed
Regards,
Tuan
1. Actually, username of the account should be stored in Joomla core #__users table. In the #__osmembership_subscribers table, we just store ID of the user account into user_id column. And base on that, we can easily get username of the account if needed
2. You should only make the field readonly, I think. And please keep in mind that in this case, the subscription form should only be available for logged in user only.
3. Yes. In that case, you would need a plugin to populate form fields data. You can write a new plugin for that purpose base on the existing user profile plugin if needed
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.