<p>I think I figured out how to do it but I'd like to get any opinions on this matter.</p>

<p>Right now I've setup a <strong>dummy template</strong> which contains a <strong>redirect</strong> to the URL with the parameter I need. So:</p>

<p><code>'activateAccountSuccessPath' =&gt; 'members/activated</code></p>

<p>And then that template contains:</p>

<p><code>{% redirect 'members/profile?activated=true' %}</code></p>

<p>This is working great. And I guess it's a clean way to do it from the point of view that each variable in the config file has a different target. But is it "cool" to do a redirect just for that?</p>

CC BY-SA 3.0
2014-12-09T09:42:13.340Z
This is how I'd do it for sure :)
Alec Ritson
CC BY-SA 3.0
2014-12-09T05:52:06.727Z
2014-12-09T05:52:06.727Z
cballenar
<p>Another possiblity is to have a <code>members/activated</code> template which does nothing but <a href="http://twig.sensiolabs.org/doc/tags/include.html" rel="nofollow">include</a> the <code>members/profile</code> template:</p>

<pre><code>{% include 'members/profile.html' with {'activated': true} %}
</code></pre>

<p>That avoids the html redirect.</p>

CC BY-SA 3.0
2014-12-09T20:05:36.433Z
2014-12-09T20:05:36.433Z
Marion Newlevant
<p>This may sound a little odd so let me explain what's going on.</p>

<p>In my current setup I have allowed new users to sign up. I want these users to follow this flow:</p>

<ol>
<li>Fill up sign up form and submit</li>
<li>Gets redirected to page that warns them of activation email</li>
<li>User opens email, clicks on link and is forwarded to his/her profile page</li>
</ol>

<p>So far I've been able to do this without any problems. However, I would like to be able to welcome the user when the account is activated without using a new template.</p>

<p>In this moment <code>'activateAccountSuccessPath'</code> is set to the profile page, let's call it <code>'members/profile'</code> I would like to pass a parameter so that I can detect if the account is being activated for the first time and therefore should display a message, e.g.: <code>'members/profile?activated=true'</code>. As of now, this isn't possible because it looks for the template with that name, not recognizing that it has parameters.</p>

<p>I would like to use this same feature for other variables such as <code>'setPasswordSuccessPath'</code>, which would take you back to the login page, but displaying a message.</p>

<p>If it's impossible to pass arguments this way, how would you recommend going about it?</p>

<users><url><config><member>
Pass URL parameter through General Config file
# Pass URL parameter through General Config file

(Asked by: username_0 on 2014-12-09)

This may sound a little odd so let me explain what's going on.

In my current setup I have allowed new users to sign up. I want these users to follow this flow:

1. Fill up sign up form and submit
2. Gets redirected to page that warns them of activation email
3. User opens email, clicks on link and is forwarded to his/her profile page

So far I've been able to do this without any problems. However, I would like to be able to welcome the user when the account is activated without using a new template.

In this moment `'activateAccountSuccessPath'` is set to the profile page, let's call it `'members/profile'` I would like to pass a parameter so that I can detect if the account is being activated for the first time and therefore should display a message, e.g.: `'members/profile?activated=true'`. As of now, this isn't possible because it looks for the template with that name, not recognizing that it has parameters.

I would like to use this same feature for other variables such as `'setPasswordSuccessPath'`, which would take you back to the login page, but displaying a message.

If it's impossible to pass arguments this way, how would you recommend going about it?

**Tags:** users, url, config, member


---

## 2 answers

### Answer by username_0 on 2014-12-09. Score: 3 | Accepted answer

I think I figured out how to do it but I'd like to get any opinions on this matter.

Right now I've setup a **dummy template** which contains a **redirect** to the URL with the parameter I need. So:

`'activateAccountSuccessPath' => 'members/activated`

And then that template contains:

`{% redirect 'members/profile?activated=true' %}`

This is working great. And I guess it's a clean way to do it from the point of view that each variable in the config file has a different target. But is it "cool" to do a redirect just for that?

> **Comments:**
> **username_1**: This is how I'd do it for sure :)  

---

### Answer by username_2 on 2014-12-09. Score: 1

Another possiblity is to have a members/activated template which does nothing but include the members/profile template:
{% include 'members/profile.html' with {'activated': true} %}

That avoids the html redirect.


---

