From 65c306da23cab8d80619bfe967e5e414b3a88964 Mon Sep 17 00:00:00 2001 From: Remo Date: Wed, 28 Jan 2015 08:14:54 +0100 Subject: [PATCH] get existing user by email and and by the network identifier --- controllers/social/controller.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/controllers/social/controller.php b/controllers/social/controller.php index a13ff05..32e8b80 100644 --- a/controllers/social/controller.php +++ b/controllers/social/controller.php @@ -71,11 +71,8 @@ public function login($network = '') protected function do_login() { - $ul = new UserList(); - $ul->filterByAttribute("{$this->network}_id", $this->user->identifier); - - $list = $ul->get(1); - $user = $list[0]; + $ui = UserInfo::getByEmail($this->user->email); + $response = false; if ($user != null) { @@ -96,7 +93,7 @@ protected function do_register() 'uName' => $uName, 'uPassword' => $rand, 'uPasswordConfirm' => $rand, - 'uEmail' => "{$rand}.social.registration@noemail.com", + 'uEmail' => $this->user->email, ); if ($ui = UserInfo::register($uData)) {