Skip Navigation

[Resolved] How do I change "No user specified" message on the toolset form to edit user?

This support ticket is created 3 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.84 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 10 replies, has 2 voices.

Last updated by cantonB 3 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#1777525
Screen Shot 2020-09-15 at 9.13.17 AM.png

Try this page:

hidden link

This is a page which includes the view for Toolset -> User Forms -> (Edit basic account)

If someone isn't logged in, it just says, "No user specified". I would prefer to have a message that says, "Click here to login" with a link to their account login page.

Thanks for any tips!

#1777767

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Canton,

Thank you for getting in touch.

Can you let me know how you are building this edit page. The reason is because you can use out conditional statements to display the form only when the user is logged in .

I need to know how the page is built to provide the correct advise.

Thanks,
Shane

#1777787
Screen Shot 2020-09-15 at 12.43.40 PM.png

Hi Shane,

I've just got a regular old form that uses the [cred_user_form] shortcode. See attached.

#1777883

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Canton,

In your case you can use our conditional shortcode to resolve this.

[wpv–conditional if="('[wpv-current-user info='logged_in']' eq '1')"]

[cred_user_form]

 [/wpv–conditional]
[wpv–conditional if="('[wpv-current-user info='logged_in']' eq '0')"]

Please log in

 [/wpv–conditional]

This should only display your form if the user is logged in.

Please let me know if this helps.
Thanks,
Shane

#1777905
Screen Shot 2020-09-15 at 2.24.14 PM.png
Screen Shot 2020-09-15 at 2.24.29 PM.png

Hello,

Thanks for the conditional code. However, when I try putting this in my regular old wordpress text area, the WPV-CONDITIONAL code doesn't get interpreted. A reminder, I'm not inserting the [cred_user_form] in the context of a view, I'm just inserting it in the body area of a regular old wordpress page. See attached.

#1777953

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Canton,

It seems you don't have our views or blocks plugin installed.

In order to use the shortcode you must have the views plugin installed. Do you have our Access plugin installed ?

Please let me know.
Thanks,
Shane

#1777973

HI Shane,
I have all those plugins installed. I've got all kinds of pages that are successfully rendering various views.

Are you sure that [wpv–conditional] is supposed to work outside the context of a view's loop? Because I'm just sticking [cred_user_form] inside a regular old wordpress text block area. I don't believe I can use [wpv-conditional] in that context, can I?

#1778035
Screen Shot 2020-09-15 at 4.42.20 PM.png

Hey, I just did a test, and you're totally right: I can use [wpv-conditional] in the context of any old HTML body. So I think the error might be in the actual snippet of code you provided me with?

For example, my first two wav-conditionals are rendering great:

[wpv-conditional if="(4 > 3)"]Four is greater than three[/wpv-conditional]
[wpv-conditional if="(3 > 4)"]Three is greater than four[/wpv-conditional]

But the ones you helped me with. (See below, and screenshot.) Maybe something to do with those nested single apostrophes? I'd love your help, because even though I'm a PHP programmer type, I have a real hard time getting my head around the syntax of WPV-CONDITIONALs. Thanks!

[wpv–conditional if="('[wpv-current-user info='logged_in']' eq '1')"]
[cred_user_form form="edit-basic-account"]
[/wpv–conditional]
[wpv–conditional if="('[wpv-current-user info='logged_in']' eq '0')"]
<a href="hidden link">Please login to your account.</a>
[/wpv–conditional]

#1778117

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Canton,

Actually the nesting of the shortcodes actually works fine.

Here is another example, I used the autogeneration for the shortcode to create this one.

[wpv-conditional if="  ( ( '[wpv-current-user info="id"]' != '' ) ) " ] 

[cred_user_form form="edit-basic-account"]

[/wpv-conditional]

[wpv-conditional if="  ( empty( '[wpv-current-user info="id"]') ) " ] 

i'm logged out

[/wpv-conditional]

Please let me know if these work.
Thanks,
Shane

#1778881

Thank you! This second snippet of code you sent works fine. The first one must have had a syntax error.

A perfect solution, I very much appreciate it.

#1778925

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.