Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

A welcome text with "user_first_action" option

Quote Reply
A welcome text with "user_first_action" option
Hi,

I use in my forum the option user_first_action to redirect new users to their profil page when they log in for the first time. I want to set on their profil page a welcome text which will appear only on their first login. Which tag should I use for this? Is it possible to do it? I tried <%if user_first_action%> but it doesn't work.

Thank you for your help.

François
Quote Reply
Re: [Franco] A welcome text with "user_first_action" option In reply to
Hi François,

The easiest way to do this would be to add a global sub, first_login, which contains this:

sub { scalar $IN->param('first_login') }

Then in your template, you would do:

<%if first_login%>...<%endif%>

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Franco] A welcome text with "user_first_action" option In reply to
That is a good idea, which I shall promptly appropriate for my own board Wink
Quote Reply
Re: [Jagerman] A welcome text with "user_first_action" option In reply to
Thank you very much, Jason! Your solution works perfectly! Smile

François