[other] automatically hide the Newsletter subscribe link once subscribed #93

Closed
opened 2026-10-04 23:43:10 +02:00 by adam · 3 comments
Owner

Reported by plg on 11 Jul 2009 22:10

Version: 2.0.3

We already have a configuration setting to hide the "subscribe to Piwigo Newsletter" link. But this is the only solution to hide this link. I mean that if you follow the link and subscribe, the link is still present.

I think we should hide it as soon as the user has followed the link. The user don't need to complete the subscription ("click on this URL" confirmation email). We could add a key in the user metadata cache.

Piwigo Bugtracker #1048

**Reported by plg on 11 Jul 2009 22:10** **Version:** 2.0.3 We already have a configuration setting to hide the &quot;subscribe to Piwigo Newsletter&quot; link. But this is the only solution to hide this link. I mean that if you follow the link and subscribe, the link is still present. I think we should hide it as soon as the user has followed the link. The user don&#039;t need to complete the subscription (&quot;click on this URL&quot; confirmation email). We could add a key in the user metadata cache. [Piwigo Bugtracker #1048](http://piwigo.org/bugs/view.php?id=1048) <!-- github-sync-id:97225727 -->
adam closed this issue 2026-10-04 23:43:10 +02:00
Author
Owner

Comment posted by plg on 12 Jul 2009 21:11

plg (myself) wrote:

> We could add a key in the user metadata cache.

Unfortunately, this column doesn't exists. There is no generic way to store a key/value related to a user without modifying the data model. Only the sessions.data column can do the job but it is session dependent and this is not interesting in that case.

A solution could be to simply insert a line in the config table: show_newsletter_subscription/false once the user has clicked on the link. I'm aware this would avoid other administrators to subscribe, but I strongly doubt it's a problem, only the webmaster subscribes.

**Comment posted by plg on 12 Jul 2009 21:11** plg (myself) wrote: &gt; We could add a key in the user metadata cache. Unfortunately, this column doesn&#039;t exists. There is no generic way to store a key/value related to a user without modifying the data model. Only the sessions.data column can do the job but it is session dependent and this is not interesting in that case. A solution could be to simply insert a line in the config table: show_newsletter_subscription/false once the user has clicked on the link. I&#039;m aware this would avoid other administrators to subscribe, but I strongly doubt it&#039;s a problem, only the webmaster subscribes. <!-- github-comment-id:124891676 -->
Author
Owner

Comment posted by plg on 29 Jul 2009 21:52

A good idea given by ddtddt: we should store a list of user ids in the hide_newsletter_subscription_for configuration setting.

**Comment posted by plg on 29 Jul 2009 21:52** A good idea given by ddtddt: we should store a list of user ids in the hide_newsletter_subscription_for configuration setting. <!-- github-comment-id:124891687 -->
Author
Owner

let's make it simple, hide the link globally if any admin clicks it.

let's make it simple, hide the link globally if any admin clicks it. <!-- github-comment-id:506720308 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#93