summaryrefslogtreecommitdiff
path: root/actions/login.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-20 02:50:43 -0800
committerEvan Prodromou <evan@status.net>2009-11-20 02:50:43 -0800
commit224d82793c769c06d1e4f39c19cd5f2e9cf519b0 (patch)
tree4e80725739ecae1a196f7f5517b33060d6fe3518 /actions/login.php
parentc0d4e0990ff4dfaa8eb6b8864be7bb07ea64551d (diff)
Revert "Added 'login' command that gives you a link that can be used to login to the website"
This reverts commit b9d40f723bce8e01ddcbbb989bd7035b92cd9af8. Conflicts: actions/login.php classes/statusnet.ini db/08to09.sql db/08to09_pg.sql db/statusnet_pg.sql lib/command.php lib/commandinterpreter.php
Diffstat (limited to 'actions/login.php')
-rw-r--r--actions/login.php9
1 files changed, 6 insertions, 3 deletions
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;