srchub

srchub Commit Details


Date:2014-12-28 21:57:40 (10 years 2 months ago)
Author:Natalie Adams
Branch:master
Commit:660df0f5d54de187d679cd6d690573f50fb74ccb
Parents: fe4e7266fd64b4c0d11e2eb8df69307ea5ceffbd
Message:Adding support for first + last name

Changes:

File differences

indefero/src/IDF/Views/User.php
277277
278278
279279
280
280
281
282
283
281284
282285
283286
    public function view($request, $match)
    {
        $db =& Pluf::db();
        $sql = new Pluf_SQL('login=%s or email=%s', array($match[1], $match[1]));
        if (strrpos($match[0], "+") === false)
            $sql = new Pluf_SQL('login=%s or email=%s ', array($match[1], $match[1]));
        else
            $sql = new Pluf_SQL('first_name=%s and last_name=%s', array(explode("+", $match[1])[0], explode("+", $match[1])[1]));
        $users = Pluf::factory('Pluf_User')->getList(array('filter'=>$sql->gen()));
        if (count($users) != 1 or !$users[0]->active) {
            throw new Pluf_HTTP_Error404();

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.13718s using 14 queries.