public function getFromUser(User $user, $type = null) { $where = array('u_id' => $user->getId()); if ($type) { $where['ud_type'] = $type; } $query = Query::select('neuron_users_deligated', array('*'), $where); return $this->getObjectsFromData($query->execute()); }
/** * Login a specific user * @param Request $request * @param User $user * @param bool $registration * @return \Neuron\Net\Response */ public function login(Request $request, User $user, $registration = false) { // Check for email validation if ($this->requiresEmailValidation()) { if (!$user->isEmailVerified()) { $request->getSession()->set('catlab-non-verified-user-id', $user->getId()); return Response::redirect(URLBuilder::getURL($this->routepath . '/notverified')); } } $request->getSession()->set('catlab-user-id', $user->getId()); return $this->postLogin($request, $user, $registration); }