ie
            if wikistate == 'undecidable':
                if False:#self.email:
                    from r2.lib.emailer      import wiki_account_unconfirmed
                    wiki_account_unconfirmed(self)
                else:
                    from r2.models.link      import Message
                    Message._new(Account._by_name('lesswrong'), self, 'wiki
account', 'We were unable to determine if there is an Less Wrong wiki
account registered to your account.  If you do not have an account and
would like one, please go to prefs/wiki.', None)


On Sun, Nov 17, 2013 at 9:25 PM, Lucas Sloan <
predictably.defenestrated@gmail.com> wrote:

> Is there an admin account I can officially send messages from?
>
>
> On Sun, Nov 17, 2013 at 7:21 PM, jack-trikeapps <notifications@github.com>wrote:
>
>> In r2/r2/models/account.py:
>>
>> > @@ -185,6 +187,24 @@ def monthly_karma(self):
>> >          ret = self.monthly_karma_ups_downs
>> >          return ret[0] - ret[1]
>> >
>> > +    @property
>> > +    def associated_wiki_account(self):
>> > +        if self.wiki_account == 'unknown':
>> > +            from r2.lib.wiki_user_query  import wiki_user_query
>> > +            exists = wiki_user_query(self.name)
>> > +
>> > +            if exists == 'undecidable':
>> > +                if self.email:
>> > +                    from r2.lib.emailer      import wiki_account_unconfirmed
>> > +                    wiki_account_unconfirmed(self)
>> > +                exists = 'associated'
>>
>> It seems like there are a whole pile of concerns mixed together in this
>> method:
>> 1. Lazily (i.e., on load of a page for each user) check for the presence
>> of an associated wiki account and mark it as associated.
>> 2. Control the display of the sidebar box or link to their user page.
>>
>> IMHO, nothing to do with #2<https://github.com/tricycle/lesswrong/pull/2>should be in this method (it should be over in
>> https://github.com/tricycle/lesswrong/pull/95/files#diff-760ec01bdf54d61192a927b07191d5aaR93, say) because it is causing the object to tell fibs about its own state.
>> It also means that the sidebar box must show either the link to a user page
>> (and if the Account is "pretending" to be 'associated', it will show a
>> broken link) or a form to create the wiki account (also wrong - the user
>> needs to register their actual wiki name if we can't work it out). If
>> wiki_user_query(self.name) == 'undecidable', neither of these are
>> correct - the sidebar box should be suppressed.
>>
>> It seems like there are 3 sets of transitions going on here:
>>
>>    1. 'unknown' -> 'associated': we looked up the wiki username, found
>>    it was there and saved it.
>>    2. 'unknown' -> 'unassociated': we looked up the wiki username, it
>>    wasn't there and saved it.
>>    3. 'unknown' -> 'undecideable' -> 'waiting-confirmation': we have no
>>    idea what their username should be and asked them. What if the user doesn't
>>    have an email address on their account?
>>
>> Also: the variable name exists no longer describes what the variable
>> actually does. Please change it.
>>
>> —
>> Reply to this email directly or view it on GitHub<https://github.com/tricycle/lesswrong/pull/95/files#r7715985>
>> .
>>
>
>
>
> --
> "*And someday when the descendants of humanity have spread from star to
> star, they won't tell the children about the history of Ancient Earth until
> they're old enough to bear it; and when they learn they'll weep to hear
> that such a thing as Death had ever once existed!*"
>
> -Eliezer Yudkowsky
>
> "Trust me" means "I love you" <http://project-apollo.net/mos/mos114.html>
>
> "This isn't even my final form!"
>
> -Tim Hausler
>



-- 
"*And someday when the descendants of humanity have spread from star to
star, they won't tell the children about the history of Ancient Earth until
they're old enough to bear it; and when they learn they'll weep to hear
that such a thing as Death had ever once existed!*"

-Eliezer Yudkowsky

"Trust me" means "I love you" <http://project-apollo.net/mos/mos114.html>

"This isn't even my final form!"

-Tim Hausler