What's the deal with Deno? We talk with a major contributor to find out. Listen now.
17

You need to change your input tag from: <input id="Address" type="text" name="Address" {%- if account is defined %} value="{{ account.Address}}"{% endif -%}> To: <input id="Address" type="text" name="fields[Address]" {%- if account is defined %} value="{{ account.Address}}"{% endif -%}> All custom fields input types should have a name ...


16

Check out the autoLoginAfterAccountActivation config setting. To enable it, set it to true in your craft/config/general.php file: 'autoLoginAfterAccountActivation' => true


11

If anyone is interested in confirming passwords still, I have wrote a plugin which does just this, it doesn't rely on it's own controller either so there is no bypassing of Crafts own workings :) https://github.com/alecritson/Craft-Password-Confirm All you need to do is add a passwordConfirm field to your existing form: <input type="password" name="...


8

See the docs here: https://craftcms.com/docs/users#public-registration Public Registration Craft Pro has the option of allowing public user registration. It is not enabled by default, though. To enable it, you must go to Settings → Users → Settings, and check the “Allow public registration?” setting. With that checked, you will also be given the ...


7

If you're looking for a Craft 3 solution, I just got this set up on a project and hope it helps someone else out. First you'll need to add a custom field to your form. If you want your user to choose which field, then go with a dropdown or radio button and adjust the plugin logic below. My scenario required me using a hidden field and auto-filling in the ...


6

I believe you would need a plugin for this — but the plugin can be really basic. In your plugin's main file simply add an 'init' method that listens to the 'users.saverUser' event and checks the 'isNewUser' event attribute; then prepare and send your email. The process is outlined in this answer that sends out an email to members of a userGroup when an ...


6

Craft 2: By default Craft enforces a 6 character minimum as the only password requirement, but as of Craft 2.3, a plugin can now listen for the users.onBeforeSetPassword event to enforce any password requirements it wants for newly set/changed passwords and set $performAction = false to cancel the action with any validation errors returned on the UserModel. ...


6

The users are not getting assigned to the default user group. You're probably testing front-end user registration with an already logged in user account. Make sure you log out of your current one first before you start testing creating new users. The password is not required but fails validation when there is 1-6 characters (as it should). Must I enforce ...


5

EDIT Craft 2.4 is now available, and the users/saveUser action will now return a JSON response for AJAX requests. The original answer is still valid for <2.4 builds: No, there's no way to trigger a JSON response for the users/saveUser action. Other UsersController actions (such as users/login do return JSON for AJAX requests, so it might be an idea to ...


4

This the best article I've read on reliably delivering emails through code: http://blog.codinghorror.com/so-youd-like-to-send-some-email-through-code/


4

In addition to letting JavaScript take care of the extra front-end logic, you could also write a plugin that exposes a controller that does the extra email and password sameness checks from PHP. If those are equal, then it would just pass the data off to craft()->users->saveUser(), otherwise, return any validation errors back to the template.


4

This answer was originally written for Craft 2. For a Craft 3 solution, see Ryan's answer above. I literally just worked through this problem last week. Ran into the same issue, so I reached out to P&T. Turns out there is a "catch"... For a new user, the $_POST['groups'] value is passed as an empty array. And because of the order that it's ...


4

I'll focus on the "sending an activation email from the front end" part of your question, since that seems to be the crux of it: You'd have to write a very simple, custom plugin. For instant success, scaffold your plugin using the Plugin Factory. Under Plugin Components, enable Controllers. Unzip and install your plugin. In the Controller class, add ...


4

I have done something very similar. You'll want to create a plugin for this. In my case, I am validating email addresses so I was checking against the onBeforeActivateUser event. If you are not validating email addresses, @Lindsey D' answer is where you want to go. Either way, they will look about like this: I created a plugin called accounts. MyPlugin....


4

Just in case anyone else has this issue i got it working with these modifications. I think the hidden field was required for the possibility of null values. <input type="hidden" name="fields[myCustomField]" value="no"> It also required the extra [] brackets after the field name in the checkbox option (as checkbox fields are an array). name="fields[...


3

Commerce is definitely Craft's achilles' heel right now. Like you, I'd love to switch over completely off WP but picking the best tool for the job means either rolling up your sleeves and writing your own or picking the best available solution and unfortunately that could be WP/Gravity... at least right now. We're also hoping to hand off the form ...


3

Solved the mystery. :) The issue was that even though my user fields were not required, there was a numeric 'year' field which had min and max values set, and this was throwing it off (and I had removed that field during my last round of testing to keep things simple). Removing those required min and max values allowed the form to be submitted. Thanks for ...


3

1) You can set the default user group through your admin: 2) Also I'm pretty sure <input type="hidden" name="userGroups" = "1"> needs to be set to <input type="hidden" name="userGroups" value="1"> for it to work but I'd need to test to be sure.


3

You can write a plugin that has a Template Variable that exposes Craft's SystemSettingsService->getSettings() method like so: public function isPublicRegistrationEnabled() { return craft()->systemSettings->getSetting('users', 'allowPublicRegistration'); } You'd call it from the template via: {% if craft.myAwesomePlugin....


3

There's a nice plugin by Trevor Davis for this use case: https://github.com/vigetlabs/craft-pendinguser


3

There is no current way that I know of that does this, but you can probably do it relatively easy with a custom plugin. If e-mail validation is turned off in the Users settings, the created user is verified by default. You can hook into the users.onBeforeSaveUser event and set the status as UserStatus::Pending. Then redirect them to a screen saving ...


3

As far as I know there is no way to do this without a plugin. However, developing a plugin for this is not difficult. In your form you would want to add an additional drop-down, multi-select, or checkbox field with your groups listed. Then in your plugin, create a listener in your plugin's init method that listens for the users.saveUser event, and ...


3

Some sort of workaround You can make a register user group with no permissions. Than add another group with the permissions you want. After registration, the admin can put a new user to the new group.


3

No custom plugin necessary if you don't want to write one, as there is already one that exists to do this very task and so much more. Checkout Postmaster for Craft. https://github.com/objectivehtml/Postmaster-for-Craft-CMS


3

Emails only send out when you're not logged in as admin from the front-end registration form.


3

I'm not sure that I agree with your analysis. At a minimum maybe it's a feature request with a config setting to change the behavior. But if you're really concerned about the behavior, you can currently set the purgePendingUsersDuration config setting to something like 24 hours so they don't hang around very long.


3

Its not at all difficult. Here's the example form from the docs: https://craftcms.com/docs/templating/user-registration-form <form method="post" accept-charset="UTF-8"> {{ getCsrfInput() }} <input type="hidden" name="action" value="users/saveUser"> <input type="hidden" name="redirect" value=""> {% macro errorList(errors) %...


3

(Not necessarily a great answer to your question, but it's in the same wheelhouse and might be handy if you're working in this area)! I remember having issues with this myself (to be honest the precise details are a bit lost in time for me - but basically IIRC it's by design that they're not logged in after creation, perhaps to force them to practise login/...


3

Okay - got to the bottom of this. Was using the wrong setting. Should have been setPasswordSuccessPath not setPasswordSuccess!


3

You could use Regex (Regular Expression), /^[a-zA-Z]{3,}$/ would for instance allow a minimum of 3 characters behind the comma would be the max value. As for numbers it would be something like this /^[0-9]{3,}$/ http://regexr.com/ to test your regex en examples And I would do this before the user is saved with the users.onBeforeSaveUser Event in a plugin.


Only top voted, non community-wiki answers of a minimum length are eligible