public function index() { $userinfo = M('user')->where(array('id' => $_SESSION['uid']))->find(); $userinfo['rolename'] = UserController::userRole($userinfo['role']); $this->userinfo = $userinfo; $this->display(); }
protected function editUser($user) { $entityManager = $this->controller->getServiceLocator()->get('entity-manager'); $entityManager->persist($user); $entityManager->flush(); }