Answers.Body: <blockquote>
    <p>I want to be able that users can enter their emailaddress in an input and that the activation link gets resend</p>
  </blockquote>
  
  <p>You'll need to write a <a href="https://buildwithcraft.com/docs/plugins/introduction" rel="nofollow">plugin</a>, which can generate activation URLs using the <a href="https://buildwithcraft.com/classreference/services/UsersService" rel="nofollow">UsersService</a>:</p>
  
  <pre><code>echo craft()-&gt;users-&gt;getPasswordResetUrl($user);
  </code></pre>
  
  <p>If you want to send the user an activation email instead of echoing a link in the frontend, you can use the <code>sendActivationEmail</code> method instead:</p>
  
  <pre><code>craft()-&gt;users-&gt;sendActivationEmail($user);
  </code></pre>
  
  <p>Note that for both methods, <code>$user</code> should be an instance of <a href="https://buildwithcraft.com/classreference/models/UserModel" rel="nofollow">UserModel</a>, meaning you'll first need to pull the relevant user:</p>
  
  <pre><code>$user = craft()-&gt;users-&gt;getUserByEmail($userEmail);
  </code></pre>
  
  <p>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 <a href="http://buildwithcraft.com/docs/plugins/variables" rel="nofollow">template variable</a> to output the activation URL:</p>
  
  <pre><code>&lt;a href="{{ craft.myPlugin.getActivationUrl }}"&gt;Click here to activate your account now&lt;/a&gt;
  </code></pre>
  
  <p>...or you could create a <a href="http://buildwithcraft.com/docs/plugins/controllers" rel="nofollow">controller</a> which would provide a link for re-sending the activation email:</p>
  
  <pre><code>&lt;a href="{{ actionUrl( 'myPlugin/sendActivationEmail' ) }}"&gt;Click to resend activation email&lt;/a&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-17T21:30:44.330Z
Answers.LastActivityDate: 2016-08-18T16:43:57.363Z
Answers.LastEditDate: 2016-08-18T16:43:57.363Z
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Answers.Body: <p>Go to the Users section of the Control Panel (mysite.com/admin/users/). Click on the user account that needs to be activated. Click on the settings cog on the right side (see attached image), and choose which option works for you.</p>
  
  <p>Hope this helps!</p>
  
  <p><img src="https://i.sstatic.net/HGPPs.png" alt="Settings for unverified user"></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-17T17:07:08.107Z
Answers.LastActivityDate: 2015-05-17T17:07:08.107Z
Answers.UserDisplayName: Aaron Berkowitz
Body: <p>When logging in indicates the 'account has not been activated', how do I create a link for resending the activation email?</p>
  
  <p><strong>Update</strong><br>
  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!</p>
  
Tags: <frontend><login><activation>
Title: Code for resending the activation email
ThreadText: # Code for resending the activation email
  
  (Asked by: username_0 on 2015-05-17)
  
  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!
  
  **Tags:** frontend, login, activation
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-05-17. Score: 7
  
  > 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](https://buildwithcraft.com/docs/plugins/introduction), which can generate activation URLs using the [UsersService](https://buildwithcraft.com/classreference/services/UsersService):
  
  ```
  echo craft()->users->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()->users->sendActivationEmail($user);
  
  ```
  
  Note that for both methods, `$user` should be an instance of [UserModel](https://buildwithcraft.com/classreference/models/UserModel), meaning you'll first need to pull the relevant user:
  
  ```
  $user = craft()->users->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](http://buildwithcraft.com/docs/plugins/variables) to output the activation URL:
  
  ```
  <a href="{{ craft.myPlugin.getActivationUrl }}">Click here to activate your account now</a>
  
  ```
  
  ...or you could create a [controller](http://buildwithcraft.com/docs/plugins/controllers) which would provide a link for re-sending the activation email:
  
  ```
  <a href="{{ actionUrl( 'myPlugin/sendActivationEmail' ) }}">Click to resend activation email</a>
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2015-05-17. Score: 5
  
  Go to the Users section of the Control Panel (mysite.com/admin/users/). Click on the user account that needs to be activated. Click on the settings cog on the right side (see attached image), and choose which option works for you.
  
  Hope this helps!
  
  ![Settings for unverified user](https://i.sstatic.net/HGPPs.png)
  
  
  ---
  
  