This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

mattm
mattm

I set login attribute to Username. I try to register an account and get "Username field is required".

Though it works if I set to Email instead, but I need to use Username.

Alt text

Alt text

Alt text

If I register with "Email":

I don't understand, the username is a unique Email and the email is a unique Email. But name can allow duplicates from multiple users? And surname masks over the real name?

So I can't have unique names, only unique email names?

Array output from {{ user }}:

{ "id":24, "name":"testuser", "email":"testuser@example.com", "permissions":null,"is_activated":true, "activated_at":"2017-03-09 03:34:21", "last_login":"2017-03-09 03:38:46", "created_at":"2017-03-09 03:34:21", "updated_at":"2017-03-09 03:38:46", "username":"testuser@example.com", "surname":"", "deleted_at":null, "last_seen":"2017-03-09 03:38:46", "is_guest":0,"is_superuser":0 }

Does using Login attribute "Username" allow for unique name?

Last updated

mattm
mattm

I may have solved it using the custom form provided in the docs. I was trying to use the default component form. I should have looked there first.

I have to change my Twig parameters to see if the rest is working.

<form data-request="onRegister">
    <label>Full Name</label>
    <input name="name" type="text" placeholder="Enter your full name">

    <label>Email</label>
    <input name="email" type="email" placeholder="Enter your email">

    <label>Username</label>
    <input name="username" placeholder="Pick a login name">

    <label>Password</label>
    <input name="password" type="password" placeholder="Choose a password">

    <button type="submit">Register</button>
</form>

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.