how to make user_id field show in the profile

13 years 2 months ago - 13 years 2 months ago #154678 by ignatius2
Hello guys

How can I make the comprofiler id or the user_id fields show in the profile so that this info can be seen by registered users in the front end and used for searches in the lists.

I tried to create a new field and to document it automatically after registration with the CB Queries plugin but I could not figure out how to write the query... and using this method seems overkill.

I also tried the CB Query Field plugin but I could not figure out either and clicking on the plugin gave me a white screen error (so I unpublished it).

I read somewhere that there was a MySQL field plugin but I could not find it...

Finally and ideally, I would not want regular registered users to see their user ID info in their profile... only the users with higher proviledges...

Hope you can help and thanks for the great work...

John

Please Log in to join the conversation.

13 years 2 months ago #154683 by some1new
Hi,

you can find the MySQL Plugin. Just enter "Mysql field" into the search box on the top of the page. The first entry will direct you to the plugin.

In my opinion it´s not a good idea to give the ID´s to users.
I don´t understand why to make that ID searchable, there are lot´s of other fields and parameters you could choose to find any information to fetch a special user.

Within a professional membership there´s a powerful plugin in the incubator called "CB Conditional Plugin". That would allow you to display tabs, fields etc. to a predefined constallation such as status, ids or any situation you like.

Regards
Some1new
The following user(s) said Thank You: ignatius2

Please Log in to join the conversation.

13 years 2 months ago #154884 by krileon
CB Query Field can provide exactly this, please ensure you're using the latest release. Please also provide how you structured your query (it queries the database for a value based off the query you provided). Additionally you could just use a delimiter field with the substitution [user_id]. As for search-ability I don't see this happening with any of the 3 resolutions provided in this thread.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 2 months ago #154951 by ignatius2
I have plug_cbqueryfield-102 installed. Is it normal that I get a blank screen when I click on the plugin to check its parameters?

anyway... CB Query field or delimiter would not work because the field would not be searchable.

On the other hand, It seems to me that if I used CB Queries, the file would be searchable since the value of the field would simply be copied and pasted.

Here is the substitution query I tried with both CB Query field and CB Queries (as an automated query that runs after the registration and for registered users only...)

INSERT `#__jos_comprofiler` ( `cb_nameoffield` ) VALUES ( [user_id] )

It does not work.

Thanks

John

Please Log in to join the conversation.

13 years 2 months ago - 13 years 2 months ago #155012 by krileon

I have plug_cbqueryfield-102 installed. Is it normal that I get a blank screen when I click on the plugin to check its parameters?

No, enable debug mode and review any on-screen errors.

On the other hand, It seems to me that if I used CB Queries, the file would be searchable since the value of the field would simply be copied and pasted.

I suggest using CB Fields actually as you simply select a field from a drop down then add the [user_id] substitution for its value. Much easier then a database query.

Here is the substitution query I tried with both CB Query field and CB Queries (as an automated query that runs after the registration and for registered users only...)

Query Field only accepts SELECT queries, insert is not a select.

INSERT `#__jos_comprofiler` ( `cb_nameoffield` ) VALUES ( [user_id] )

This is no where near valid. Please do not tamper with queries if you do not know what you're doing; luckily the table isn't valid or you'd have seriously messed up your CB users table. The below is acceptable.
UPDATE `#__comprofiler` SET `cb_myfield` = [user_id] WHERE `id` = [user_id]

I recommend you use CB Fields incubator project to do this however as you do not need to mess with queries.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: ignatius2

Please Log in to join the conversation.

13 years 2 months ago #155119 by ignatius2
Oops...

Thanks for the code... I'll try asap with CB Queries as it works very well on my system.

How would this code need to be modified to copy the email of the profile owner into a new field in jos_comprofiler?

I need to send email notification to profile-owners and I have no clue as where to find this email. I assume that it is encrypted somewhere and need to be extracted somehow.

Thanks

John

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.253 seconds

Facebook Twitter LinkedIn