Skip to content

Commit

Permalink
spliited auth response in result and session
Browse files Browse the repository at this point in the history
  • Loading branch information
zolex committed Apr 24, 2012
1 parent 53ff045 commit 6d368db
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@
break;

case 'auth':
$writer->startElement('session');
$writer->text(Accounts::authenticate($source['name'], $source['pass']));
$session = Accounts::authenticate($source['name'], $source['pass']);
$writer->startElement('result');
$writer->text((int)($session !== false));
$writer->endElement();
if ($session !== false) {

$writer->startElement('session');
$writer->text($session);
$writer->endElement();
}
break;

case 'pass':
Expand Down

0 comments on commit 6d368db

Please sign in to comment.