summaryrefslogtreecommitdiff
path: root/classes/User.php
AgeCommit message (Collapse)Author
2010-03-11Drop timestamp cutoff parameter from User::getCurrentNotice() and ↵Brion Vibber
Profile::getCurrentNotice(). It's not currently used, and won't be efficient when we update the notice.profile_id_idx index to optimize for our id-based sorting when pulling user post lists for profile pages, feeds etc.
2010-03-03Use poster's subscribed groups to disambiguate group linking when a remote ↵Brion Vibber
group and a local group exist with the same name. (If you're a member of two groups with the same name though, there's not a defined winner.)
2010-03-02Dropped deprecated timestamp-based 'since' parameter for all API methods. ↵Brion Vibber
When it sneaks in it can cause some very slow queries due to mismatches with the indexing. Twitter removed 'since' support some time ago, and we've already removed it from the public timeline, so it shouldn't be missed.
2010-02-19Refactor subs_* functions for remote useEvan Prodromou
The subs_* functions in subs.php have made a lot of assumptions about users versus profiles. I've refactored the functions to be methods of the Subscription class instead, and to use Profile objects throughout. Some of the checks for blocks or existing subscriptions depended on users or profiles, so I've moved those methods around a bit. I've left stubs for the subs_* functions until we get time to replace them.
2010-02-04Inbox::streamNotices() with deletion compensation: inbox paging should more ↵Brion Vibber
or less work with deleted items now. No change in efficiency for the common case where nothing's deleted: does the same bulk fetch of just the notices we think we'll need as before, then if we turned up short keeps checking one by one until we've filled up to our $limit. This can leave us with overlap between pages, but we already have that when new messages come in between clicks; seems to be the lesser of evils versus not getting a 'before' button. More permanent fix for that will be to switch timeline paging in the UI to use notice IDs.
2010-02-01restructuring of User::registerNew() lost password mungingEvan Prodromou
2010-01-31buggy fetch for site ownerEvan Prodromou
2010-01-29add hooks for user registrationEvan Prodromou
2010-01-29method to get the site ownerEvan Prodromou
2010-01-25Offload inbox updates to a queue handler to speed up posting onlineEvan Prodromou
Moved much of the writing that happens when posting a notice to a new queuehandler, distribqueuehandler. This updates tags, groups, replies and inboxes at queue time (or at Web time, if queues are disabled). To make this work well, I had to break up the monolithic Notice::blowCaches() and make cache blowing happen closer to where data is updated. Squashed commit of the following: commit 5257626c62750ac4ac1db0ce2b71410c5711cfa3 Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 14:56:41 2010 -0500 slightly better handling of blowing tag memory cache commit 8a22a3cdf6ec28685da129a0313e7b2a0837c9ef Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 01:42:56 2010 -0500 change 'distribute' to 'distrib' so not too long for dbqueue commit 7a063315b0f7fad27cb6fbd2bdd74e253af83e4f Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 01:39:15 2010 -0500 change handle_notice() to handle() in distributqueuehandler commit 1a39ccd28b9994137d7bfd21bb4f230546938e77 Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 16:05:25 2010 -0500 error with queuemanager commit e6b3bb93f305cfd2de71a6340b8aa6fb890049b7 Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 01:11:34 2010 -0500 Blow memcache at different point rather than one big function for Notice class commit 94d557cdc016187d1d0647ae1794cd94d6fb8ac8 Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 00:48:44 2010 -0500 Blow memcache at different point rather than one big function for Notice class commit 1c781dd08c88a35dafc5c01230b4872fd6b95182 Author: Evan Prodromou <evan@status.net> Date: Wed Jan 20 08:54:18 2010 -0500 move broadcasting and distributing to new queuehandler commit da3e46d26b84e4f028f34a13fd2ee373e4c1b954 Author: Evan Prodromou <evan@status.net> Date: Wed Jan 20 08:53:12 2010 -0500 Move distribution of notices to new distribute queue handler
2010-01-13unimplement repeatedToMe() until we figure out howEvan Prodromou
2010-01-09some formatting changes to make inblobs workEvan Prodromou
2010-01-09Use inbox instead of notice_inboxEvan Prodromou
2009-12-28More configuration options for location sharingEvan Prodromou
2009-12-28remove namespace setting from location; it's unusedEvan Prodromou
2009-12-28check if other user exists before unsubEvan Prodromou
2009-12-22Fix for massively slow friends timeline query due to indexing bug introduced ↵Brion Vibber
with repeats. Sorting on notice.id when our primary selector was notice_inbox.user_id caused a filesort and table scan of the notice table. Switchng to notice_inbox's notice_id means we can use our index, and everything comes right up. Before: mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice.id DESC LIMIT 61 OFFSET 0; +----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+ | 1 | SIMPLE | notice_inbox | ref | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4 | const | 102600 | Using index; Using temporary; Using filesort | | 1 | SIMPLE | notice | eq_ref | PRIMARY | PRIMARY | 4 | stoica.notice_inbox.notice_id | 1 | Using index | +----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+ After: mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice_id DESC LIMIT 61 OFFSET 0; +----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+ | 1 | SIMPLE | notice_inbox | ref | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4 | const | 102816 | Using where; Using index | | 1 | SIMPLE | notice | eq_ref | PRIMARY,notice_repeatof_idx | PRIMARY | 4 | stoica.notice_inbox.notice_id | 1 | Using where | +----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
2009-12-16Add doc comments listing the array parameters for User::register() and ↵Brion Vibber
Notice::saveNew()
2009-12-16Fix UserRightsTest unit testsBrion Vibber
2009-12-14add friends_timeline with no repeats in itEvan Prodromou
2009-12-12add statuses/retweeted_to_me to APIEvan Prodromou
2009-12-12add statuses/retweets_of_me to APIEvan Prodromou
2009-12-12add statuses/retweeted_by_me api actionEvan Prodromou
2009-12-03Was deleting wrong subscription during block. Now deletes the blockee's sub ↵Zach Copley
if it exists.
2009-12-03Make it impossible to block (and thus unsubscribe from yourZach Copley
self-subscription) via the API. Additionally, make it impossible to block yourself or unsubscribe from yourself, period. I also made User use the subs.php helper function for unsubscribing during a block. Hopefully, these changes will get rid of the problem of people accidentally deleting their self-subscriptions once and for all (knock on wood).
2009-11-17Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.xEvan Prodromou
Conflicts: classes/statusnet.ini
2009-11-16Move rights check to profile and add right for new noticesEvan Prodromou
Added a right for new notices, realized that the hasRight() method should be on the profile, and moved it. Makes this a less atomic commit but that's the way it goes sometimes.
2009-11-16getGroups was not handling the case where limit=null correctlyCraig Andrews
2009-11-16change uses of User_role to Profile_roleEvan Prodromou
2009-11-16move role functions to Profile classEvan Prodromou
2009-11-15define rights around how to silence, sandbox, and delete a userEvan Prodromou
2009-11-12Added a User_username table that links the external username with a ↵Craig Andrews
StatusNet user_id Added EmailAuthenticationPlugin Added ReverseUsernameAuthenticationPlugin Changed the StartChangePassword and EndChangePassword events to take a user, instead of a nickname User::allowed_nickname was declared non-static, but used as if it was static, so I made the declaration static
2009-11-09Revert "Remove more contractions"Brion Vibber
This reverts commit 5ab709b73977131813884558bf56d97172a7aa26. Missed this one yesterday...
2009-11-08Remove more contractionsSiebrand Mazeland
* doesn't * won't * isn't * don't
2009-11-08Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.xEvan Prodromou
2009-11-08Fix bug 1962: deleteuser.php regression when OpenID plugin not enabledBrion Vibber
The User_openid data object was explicitly listed as a related field to delete from in User::delete(); this class doesn't exist anymore by default since OpenID was broken out to a plugin. Added UserDeleteRelated event for plugins to add related tables to delete from at user delete time.
2009-11-07use upper-case constants for roles and rights in hasRight()Evan Prodromou
2009-11-02Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.xEvan Prodromou
Conflicts: classes/User.php
2009-11-02Merge branch '0.8.x' into 0.9.xEvan Prodromou
Conflicts: README
2009-11-02allowed_nickname blocks top level url router namesCraig Andrews
2009-11-01Revert "Blacklist all files and directories in the web root (INSTALLDIR). ↵Evan Prodromou
Much more elegant than manually keep tracking of these invalid usernames." This reverts commit 15f9c80c28042a5f9d51ec8444e3c9c475360481. So, so, elegant! And so, so, incorrect! We can't have a user named 'notice' because that would interfere with URLs like /notice/1234. However, there is no file named 'notice' in the Web root. If there were a way to automatically pull out the virtual paths in the root dir, this may make sense. Until then, we keep track here.
2009-10-28Merge branch '0.9.x' into locationEvan Prodromou
2009-10-27Enable welcome bot to broadcast it's noticesCarlos Perilla
2009-10-23update location while registeringEvan Prodromou
2009-10-13remove inboxes optionEvan Prodromou
2009-10-04Merge branch '0.8.x' into 0.9.xEvan Prodromou
Conflicts: classes/Profile.php
2009-10-02also delete blocksEvan Prodromou
2009-10-02Merge branch '0.8.x' into deleteuserEvan Prodromou
2009-09-27let hooks override standard user rightsEvan Prodromou
2009-09-27user rightsEvan Prodromou