Sauter la navigation

[Résolu] Register, Username, Userfields

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I would like to include some user information in an email notification.

Solution: Use the following placeholders:

%%USER_EMAIL%%
%%USER_DISPLAY_NAME%%
%%USER_USERNAME%%
This support ticket is created Il y a 6 années et 7 mois. 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Auteur
Publications
#906124
toolset5.PNG
toolset4.PNG
toolset3.PNG
toolset2.PNG
toolset1.PNG

Hello, I have a problem with a user form and user fields. I've created fields on the page / user with the help of user fields, which you can also see in the registration form. Please refer
lien caché

Since the customer wanted to have all fields (as in the registration form) on the user page, I created the user fields like this (see screenshots).

Also, I have created a notification when a new user logs on.

just like here:

A new user has logged in to %% DATE_TIME %%.

Username: [wpv-user field = "display_name"],

Mail-adress: [wpv-current-user info = "email"],

Unfortunately, the user name does not work because the variable in the Cred form is probably wrong.

Also in the notification to the admin it does not work with the variables %% USER_USERNAME% and %% USER_MAIL %%.

What can I do?

#906264

Hi, can you tell me if you have updated to the new Toolset Forms 2.0? There were some improvements in the new release related to User form notifications.

Here is the preferred syntax for including the new User's display name in a notification:

%%USER_DISPLAY_NAME%%

The %%USER_EMAIL%% placeholder is linked to the User field "user_email", but I do not see that field in your CRED form. I see this "mail" field, but it's not the native WordPress User Email field:

[cred_field field='mail' post='user' value='' urlparam='' class='form-control' output='bootstrap']

Can you tell me more about this "mail" field? Is this a typo, or is this intended?

#906452
toolset6.PNG

Hello, the reason why I have changed the value of the fields are, I got an error I i do this. See screenshot.

Cred Form:

<div class="form-group">
<label>Benutzname</label>
[cred_field field='user_display_name' post='user' value='' urlparam='' class='form-control' output='bootstrap']
</div>

<div class="form-group">
<label>E-Mail</label>
[cred_field field='User_mail' post='user' value='' urlparam='' class='form-control' output='bootstrap']
</div>

#906898

Okay here is the proper syntax for the standard email field:

[cred_field field='user_email' value='' urlparam='' class='form-control' output='bootstrap']

It looks like your example field name is 'User_email', which isn't exactly right.

CRED does not natively support the display_name field, so that would require a generic field and some custom code. CRED supports first name, last name, nickname, and user login (not editable).

More info about the CRED API methods available here:
https://toolset.com/documentation/programmer-reference/cred-api/

#906915
Unbenannt2.PNG

thanks, the Joke therefore is: the variable User_email seems to be the username and not the Emailadress.
Thats the Mail:

Ein neuer Benutzer hat sich am 2018-05-31 16:59:31 angemeldet.

Benutzername: Quasimodo,

Mail-Adresse: %%USER_MAIL%%,

and attached the registerform als screenhot

#906996


the variable User_email seems to be the username and not the Emailadress.

There is no variable User_email, so I'm confused about what you're describing. You can use the email placeholder like this in a notification:

%%USER_EMAIL%%
#907037

Thanks, its maybe possible 🙂

what is the default value if I want to call the user as the notification email and send the email address and the date?

Best regards

#907106

I'm sorry, I don't understand your last question. Could you provide some more detail about what you want to accomplish?

#907135
2.PNG
1.PNG

you know the field? Scr. 1 and the box below also? Scr. I can set up a notification for myself here. Which variables can I use? I need the username and email address.

#907154
Screen Shot 2018-05-31 at 4.37.48 PM.png
Screen Shot 2018-05-31 at 4.38.09 PM.png
Screen Shot 2018-05-31 at 4.38.27 PM.png

In the notification body, you can use these placeholders:

%%USER_EMAIL%%
%%USER_DISPLAY_NAME%%
%%USER_USERNAME%%

Here are some screenshots. I am not sure I understand exactly what you want.