diff options
author | Zach Copley <zach@status.net> | 2009-11-30 10:28:58 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2009-11-30 10:28:58 -0800 |
commit | 9dc888894be179f767c59651d523d7eb66b1020f (patch) | |
tree | 6c7191b243eb9c8bbd564ae693cc25ce58360545 /actions | |
parent | 10f40661a2f517393331b554c2fec295c8c160e8 (diff) | |
parent | bb70f77a5c8801a9bf76a85584377eb55efdb392 (diff) |
Merge branch 'master' into 0.9.x
* master: (67 commits)
Ticket 2038: fix bad bug tracker link
Fix regression in group posting: bug introduced in commit 1319002e1519fafb0e82fbfd2d2723abdb3112e7. Need to use actual profile object rather than an id on a variable that doesn't exist when checking blocks :D
Log database errors when saving notice_inbox entries
Drop the username from the log id for now; seems to trigger an error loop in some circumstances
request id on logs... pid + random id per web request + username + method + url
Add OpenID ini info back into statusnet.ini as a stopgap until we can
Some changes to the OpenID DataObjects to make them emit the exact same
OpenID plugin should set 'user_openid.display' as unique key
Remove relationship: user_openid.user_id -> user.id. I don't think this
Have OpenID plugin DataObjects emit their own .ini info
Revert "Allow plugin DB_DataObject classes to not have to use the .ini file by overriding keys(), table(), and sequenceKey() for them"
Catch and report exceptions from notice_to_omb_notice() instead of letting the OMB queue handler die.
Fix regression in remote subscription; added hasRole() shadow method on Remote_profile.
Fix fatal error on OMB subscription for first-timers
Remove annoying log msg
Drop error message on setlocale() failure; this is harmless, since we actually have a working locale set up.
Catch uncaught exception
Fixed bug where reply-sync bit wasn't getting saved
Forgot to render the nav menu when on FB Connect login tab
Facebook plugin no longer takes over Login and Connect settings nav menus
...
Conflicts:
db/08to09_pg.sql
db/statusnet_pg.sql
locale/pt_BR/LC_MESSAGES/statusnet.mo
plugins/Mapstraction/MapstractionPlugin.php
Diffstat (limited to 'actions')
-rw-r--r-- | actions/finishremotesubscribe.php | 13 | ||||
-rw-r--r-- | actions/login.php | 9 |
2 files changed, 15 insertions, 7 deletions
diff --git a/actions/finishremotesubscribe.php b/actions/finishremotesubscribe.php index b1cec66f4..deee70f36 100644 --- a/actions/finishremotesubscribe.php +++ b/actions/finishremotesubscribe.php @@ -89,12 +89,16 @@ class FinishremotesubscribeAction extends Action } $remote = Remote_profile::staticGet('uri', $service->getListenerURI()); + if ($remote) { + // Note remote profile may not have been saved yet. + // @fixme not convinced this is correct at all! - $profile = Profile::staticGet($remote->id); + $profile = Profile::staticGet($remote->id); - if ($user->hasBlocked($profile)) { - $this->clientError(_('That user has blocked you from subscribing.')); - return; + if ($user->hasBlocked($profile)) { + $this->clientError(_('That user has blocked you from subscribing.')); + return; + } } /* Perform the handling itself via libomb. */ @@ -122,6 +126,7 @@ class FinishremotesubscribeAction extends Action /* The service URLs are not accessible from datastore, so setting them after insertion of the profile. */ + $remote = Remote_profile::staticGet('uri', $service->getListenerURI()); $orig_remote = clone($remote); $remote->postnoticeurl = diff --git a/actions/login.php b/actions/login.php index cee29fd09..cd1326813 100644 --- a/actions/login.php +++ b/actions/login.php @@ -79,8 +79,6 @@ class LoginAction extends Action $this->clientError(_('Already logged in.')); } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->checkLogin(); - } else if (isset($args['user_id']) && isset($args['token'])){ - $this->checkLogin($args['user_id'],$args['token']); } else { common_ensure_session(); $this->showForm(); @@ -97,7 +95,7 @@ class LoginAction extends Action * @return void */ - function checkLogin($user_id=null, $token=null) + function checkLogin() { if(isset($token) && isset($user_id)){ //Token based login (from the LoginCommand) @@ -139,6 +137,11 @@ class LoginAction extends Action $user = common_check_user($nickname, $password); } + $nickname = common_canonical_nickname($this->trimmed('nickname')); + $password = $this->arg('password'); + + $user = common_check_user($nickname, $password); + if (!$user) { $this->showForm(_('Incorrect username or password.')); return; |