Code for resending the activation email When logging in indicates the 'account has not been activated', how do I create a link for resending the activation email?

Update
I want users to be able to enter their email address in an input field and have that resend their activation link. Not in the backend, just frontend only!
I want to be able that users can enter their emailaddress in an input and that the activation link gets resend


You'll need to write a plugin, which can generate activation URLs using the UsersService:

echo craft()-&gt;users-&gt;getPasswordResetUrl($user);


If you want to send the user an activation email instead of echoing a link in the frontend, you can use the sendActivationEmail method instead:

craft()-&gt;users-&gt;sendActivationEmail($user);


Note that for both methods, $user should be an instance of UserModel, meaning you'll first need to pull the relevant user:

$user = craft()-&gt;users-&gt;getUserByEmail($userEmail);


As for the actual plugin implementation, it depends what you need/want (I'm guessing you're building your own login form/logic?). You could go with a basic template variable to output the activation URL:

&lt;a href="{{ craft.myPlugin.getActivationUrl }}"&gt;Click here to activate your account now&lt;/a&gt;


...or you could create a controller which would provide a link for re-sending the activation email:

&lt;a href="{{ actionUrl( 'myPlugin/sendActivationEmail' ) }}"&gt;Click to resend activation email&lt;/a&gt;