Answers.Body: <p>Completely untested, but something like this should do it.  Create a simple <a href="https://craftcms.com/docs/plugins/introduction" rel="nofollow">plugin</a> and add this to the main plugin class:</p>
  
  <pre><code>public function init()
  {
      craft()-&gt;on('users.onBeforeActivateUser', function(Event $event)
      {
          $user = $event-&gt;params['user'];
  
          craft()-&gt;config-&gt;set('activateAccountSuccessPath', 'members/'.$user-&gt;username);
      });
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-24T16:29:12.777Z
Answers.LastActivityDate: 2016-03-24T16:29:12.777Z
Answers.UserDisplayName: Brad Bell
Body: <p>How to set a dynamic path for <code>activateAccountSuccessPath</code> that contains the username (or any other field from the user profile)? </p>
  
Tags: <config><routing>
Title: Set a dynamic `activateAccountSuccessPath`
ThreadText: # Set a dynamic `activateAccountSuccessPath`
  
  (Asked by: username_0 on 2016-03-24)
  
  How to set a dynamic path for `activateAccountSuccessPath` that contains the username (or any other field from the user profile)?
  
  **Tags:** config, routing
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-03-24. Score: 2
  
  Completely untested, but something like this should do it. Create a simple [plugin](https://craftcms.com/docs/plugins/introduction) and add this to the main plugin class:
  
  ```
  public function init()
  {
      craft()->on('users.onBeforeActivateUser', function(Event $event)
      {
          $user = $event->params['user'];
  
          craft()->config->set('activateAccountSuccessPath', 'members/'.$user->username);
      });
  }
  
  ```
  
  
  ---
  
  