<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CKAN: Ticket #1413: Ask users to 'add email address' when logged in</title>
    <link>http://localhost/ticket/1413</link>
    <description>&lt;p&gt;
I'd like us to display a one-off banner that prompts users who log into thedatahub.org to go and update &amp;amp; their profile &amp;amp; fill in their email address (if we could do it just for those who don't have an email address, then even better)
That is, once they log in, they see a banner which says:
Please update your profile [here] and add your email address, so you can receive notifications, be able to reset your password and get updates
&lt;/p&gt;
&lt;p&gt;
Then when we build notifications or if we decide to survey people, we can actually contact them. Email address should be required as standard
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>CKAN</title>
      <url>http://assets.okfn.org/p/ckan/img/ckan_logo_shortname.png</url>
      <link>http://localhost/ticket/1413</link>
    </image>
    <generator>Trac 0.12.3</generator>
    <item>
      
        <dc:creator>dread</dc:creator>

      <pubDate>Thu, 27 Oct 2011 13:20:46 GMT</pubDate>
      <title>status, description changed; owner set</title>
      <link>http://localhost/ticket/1413#comment:1</link>
      <guid isPermaLink="false">http://localhost/ticket/1413#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;owner&lt;/strong&gt;
              set to &lt;em&gt;seanh&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;assigned&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;description&lt;/strong&gt;
              modified (&lt;a href="/ticket/1413?action=diff&amp;amp;version=1"&gt;diff&lt;/a&gt;)
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>seanh</dc:creator>

      <pubDate>Mon, 28 Nov 2011 11:18:33 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/1413#comment:2</link>
      <guid isPermaLink="false">http://localhost/ticket/1413#comment:2</guid>
      <description>
        &lt;p&gt;
I've made a first attempt at this here:
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="https://github.com/seanh/ckan/compare/feature-1413-ask-users-to-add-email-address"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://github.com/seanh/ckan/compare/feature-1413-ask-users-to-add-email-address&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I used flash_notice() to ask the user to add an email whenever they visit their account page, if they don't have one already. This means they'll see the notice when they login, because after login they are redirected to their account page. Issues:
&lt;/p&gt;
&lt;p&gt;
Is it okay to approximate 'once they log in' as 'whenever they visit their account page' like this?
&lt;/p&gt;
&lt;p&gt;
Do I need to do something to support i18n for the string I added? I looked at users of flash_*() elsewhere and they seemed to be hardcoding the strings in English.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>dread</dc:creator>

      <pubDate>Mon, 28 Nov 2011 11:53:55 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/1413#comment:3</link>
      <guid isPermaLink="false">http://localhost/ticket/1413#comment:3</guid>
      <description>
        &lt;blockquote&gt;
&lt;p&gt;
approximate 'once they log in' as 'whenever they visit their account page'
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
I had imagined that this would be done in the user.py:logged_in method, but doing it in your way sounds like an even better plan.
&lt;/p&gt;
&lt;p&gt;
Another thought is: a lot of people might just use the cookie and v. rarely logout/in. Perhaps it could be done when they come back to the site at intervals (e.g. daily)?
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
i18n
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Yes your strings should be internationalised because they are user visible.
&lt;/p&gt;
&lt;p&gt;
You're right that these other strings should be internationalised. I've created a separate ticket for this: &lt;a class="closed ticket" href="http://localhost/ticket/1491" title="defect: Visible strings need internationalisation (closed: fixed)"&gt;#1491&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>seanh</dc:creator>

      <pubDate>Tue, 29 Nov 2011 14:05:34 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/1413#comment:4</link>
      <guid isPermaLink="false">http://localhost/ticket/1413#comment:4</guid>
      <description>
        &lt;blockquote&gt;
&lt;p&gt;
Another thought is: a lot of people might just use the cookie and v. rarely logout/in.
Perhaps it could be done when they come back to the site at intervals (e.g. daily)?
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
As discussed on IRC I've moved the notice from the user account page to the front page, in the hopes that people will see it often enough even if they are always logged in via a cookie. As discussed on IRC, we could make the notice appear on every page but no more than once per day, but that would be more complicated to implement and more likely to break.
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
Yes your strings should be internationalised because they are user visible.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Done.
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
You're right that these other strings should be internationalised. I've created a
separate ticket for this: &lt;a class="closed ticket" href="http://localhost/ticket/1491" title="defect: Visible strings need internationalisation (closed: fixed)"&gt;#1491&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Also done! :)
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>seanh</dc:creator>

      <pubDate>Tue, 29 Nov 2011 19:32:40 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/1413#comment:5</link>
      <guid isPermaLink="false">http://localhost/ticket/1413#comment:5</guid>
      <description>
        &lt;p&gt;
Added a 'please enter your full name' flash notice as well (the two are combined into one if they have neither full name nor email), added unit tests, fixed some issues.
&lt;/p&gt;
&lt;p&gt;
Still need to adjust the strings and change the full name notice so that it applies to people with gmail IDs only.
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="https://github.com/seanh/ckan/compare/feature-1413-ask-users-to-add-email-address"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://github.com/seanh/ckan/compare/feature-1413-ask-users-to-add-email-address&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>seanh</dc:creator>

      <pubDate>Mon, 05 Dec 2011 12:28:11 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/1413#comment:6</link>
      <guid isPermaLink="false">http://localhost/ticket/1413#comment:6</guid>
      <description>
        &lt;p&gt;
Adjusted the 'please add your email' string and changed the 'please add your full name' notice to be used only for Google OpenID users. Finished?
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="https://github.com/seanh/ckan/commits/feature-1413-ask-users-to-add-email-address"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://github.com/seanh/ckan/commits/feature-1413-ask-users-to-add-email-address&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>seanh</dc:creator>

      <pubDate>Wed, 07 Dec 2011 13:24:06 GMT</pubDate>
      <title>status changed; resolution set</title>
      <link>http://localhost/ticket/1413#comment:7</link>
      <guid isPermaLink="false">http://localhost/ticket/1413#comment:7</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;assigned&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>dread</dc:creator>

      <pubDate>Wed, 07 Dec 2011 14:51:12 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/1413#comment:8</link>
      <guid isPermaLink="false">http://localhost/ticket/1413#comment:8</guid>
      <description>
        &lt;p&gt;
Code reviewed - looks really good. Do merge in to master if it is not already.
&lt;/p&gt;
&lt;p&gt;
A couple of tips:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;we all use 'model.User' instead of 'model.user.User' but it's not important for tests...
&lt;/li&gt;&lt;li&gt;probably better to use &lt;a class="missing wiki"&gt;CreateTestData?&lt;/a&gt;.create_user() to create user objects in the future, avoiding faffing around with creating revisions etc. that are also nastier to debug when they go wrong.
&lt;/li&gt;&lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>dread</dc:creator>

      <pubDate>Thu, 23 Feb 2012 18:08:06 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/1413#comment:9</link>
      <guid isPermaLink="false">http://localhost/ticket/1413#comment:9</guid>
      <description>
        &lt;p&gt;
Went into CKAN 1.6
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>