Saltar navegación

[Resuelto] Login Form Field Label Text

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

The issue here is that the user created a manual login form

<form name="loginform" id="loginform" action="https://mydomain.com/wp-login.php" method="post">
            <div class="wp-success"></div>
            <p class="login-username">
                <label for="user_login">Your Email Address</label>
                <input type="text" name="log" id="user_login" class="input" value="" size="20" />
            </p>
            <p class="login-password">
                <label for="user_pass">Your Password</label>
                <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" />
            </p>          
            <p class="login-submit">
                <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Log In" />
                <input type="hidden" name="redirect_to" value="https://mydomain.com/my-account/" />
            </p>
            <input type="hidden" name="wpv_login_form" value="on"/><input type="hidden" name="wpv_login_form_redirect_on_fail" value="https://mydomain.com/incorrect-password/" />
        </form>

They wanted to know if this code was safe to use.

Solution:

Yes this is ok, the authentications are handled by the wordpress api itself so the form just serves as an interface to that API.

There shouldn't be any security issues.

This support ticket is created hace 6 años, 5 meses. 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
- 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)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por julieP hace 6 años, 5 meses.

Asistido por: Shane.

Autor
Mensajes
#1084579

I want my users to sign in using their email address (I don't want to give them the option of using their username).

The Toolset [wpv-login-form] shortcode contains a label 'Username or email'. In order to customise this, I looked at the page source, extracted the form contents and created a shortcode for it of my own (see code below).

This works but I'd appreciate confirmation that it's OK to do it this way and it doesn't it pose any security issues.

<form name="loginform" id="loginform" action="<em><u>enlace oculto</u></em>" method="post">
			<div class="wp-success"></div>
			<p class="login-username">
				<label for="user_login">Your Email Address</label>
				<input type="text" name="log" id="user_login" class="input" value="" size="20" />
			</p>
			<p class="login-password">
				<label for="user_pass">Your Password</label>
				<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" />
			</p>			
			<p class="login-submit">
				<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Log In" />
				<input type="hidden" name="redirect_to" value="<em><u>enlace oculto</u></em>" />
			</p>
			<input type="hidden" name="wpv_login_form" value="on"/><input type="hidden" name="wpv_login_form_redirect_on_fail" value="<em><u>enlace oculto</u></em>" />
		</form>

Thanks

#1084667

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Julie,

Yes this is ok, the authentications are handled by the wordpress api itself so the form just serves as an interface to that API.

You shouldn't face any issues.

Thanks,
Shane

#1085453

Awesome, thank you!