Fixing Issue 89

This commit is contained in:
Nathan Adams 2014-12-28 20:54:24 -06:00
parent b8c7f906eb
commit fe4e7266fd

View File

@ -277,7 +277,7 @@ class IDF_Views_User
public function view($request, $match) public function view($request, $match)
{ {
$db =& Pluf::db(); $db =& Pluf::db();
$sql = new Pluf_SQL('login=%s', array($match[1])); $sql = new Pluf_SQL('login=%s or email=%s', array($match[1], $match[1]));
$users = Pluf::factory('Pluf_User')->getList(array('filter'=>$sql->gen())); $users = Pluf::factory('Pluf_User')->getList(array('filter'=>$sql->gen()));
if (count($users) != 1 or !$users[0]->active) { if (count($users) != 1 or !$users[0]->active) {
throw new Pluf_HTTP_Error404(); throw new Pluf_HTTP_Error404();