From 9b3fc50cfe7eef8fe90afe54575a88b05cdfb5b8 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Thu, 1 May 2014 20:16:23 +0400 Subject: [PATCH] =?UTF-8?q?FIX=20-=20=D0=BD=D0=B0=D0=BF=D1=83=D1=82=D0=B0?= =?UTF-8?q?=D0=BB=20=D1=81=20=D1=82=D0=B8=D0=BF=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/controllers/IndexController.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ground/controllers/IndexController.php b/ground/controllers/IndexController.php index 8e47567..86dc486 100644 --- a/ground/controllers/IndexController.php +++ b/ground/controllers/IndexController.php @@ -53,7 +53,7 @@ class IndexController extends Controller if( !$user->id ) { - $res = $user->add(array( + $user = $user->add(array( 'uid' => $uLoginUser['identity'], 'nick' => $uLoginUser['nickname'], 'name' => $uLoginUser['first_name'], @@ -61,12 +61,7 @@ class IndexController extends Controller 'network' => $uLoginUser['network'] )); - if ($res) - { - $user = new User(); - $user = $user->getByPK($res); - } - else + if (!$user) { return false; }