How to redirect to l() function link after login? I'm having a Simplenews newsletter template with a link guiding newsletter readers to a intranet site with more news.

&lt;?php print l('hier.', 'node/' . $build['#node']-&gt;nid, array('absolute' =&gt; TRUE)); ?&gt;


My problem now is, that if the user is not logged in, that link only brings him to the login site, where he is then stucked.

What would I have to do or what function would help me to somehow provide a link that redirects the not logged in user to the proper aim after logging in, and which would not affect the already logged in user?
You can add a additional destination parameter to the function.

&lt;?php
print l(t('Title'), 'url', array('query' =&gt; array('destination' =&gt; 'destination_url')))
?&gt; 


This will create : 

&lt;a href="url?destination=destination_url"&gt;Title&lt;/a&gt;


Hope it helps.