站点注册时codeigniter 500内部服务器错误。

时间:2013-12-27 13:22:17

标签: php codeigniter

CI在网站注册时返回500错误。这是我的注册逻辑。

if ($this->form_validation->run() == true && $this->ion_auth->register($username, $password, $email, $additional_data, $group))
    {
        //check to see if we are creating the user

            $remember = TRUE;
            if ($this->ion_auth->login($this->input->post('email'), $this->input->post('password'), $remember))
            {
                //if the login is successful


                //set the flash data error message if there is one
                $this->data['message'] = (validation_errors()) ? validation_errors() : $this->ion_auth->messages();
                $this->data['alert_message'] = ($this->ion_auth->alert_messages()) ? $this->ion_auth->alert_messages():'';

                //list the users
                $this->data['users'] = $this->ion_auth->users()->result();
                $this->data['user_type'] = array();
                foreach ($this->data['users'] as $k => $user)
                {
                    $this->data['users'][$k]->groups = $this->ion_auth->get_users_groups($user->id)->result();

                    foreach ($this->data['users'][$k]->groups as $group) {
                        $this->data['user_type'][] = $group->name;  
                    }
                }

                $this->data['birthdays'] = $this->ion_auth->birthdays_records();

                $this->_render_page('main', $this->data);
        }
        else
        {
            //if the login was un-successful
            //redirect them back to the login page
            $this->session->set_flashdata('message', $this->ion_auth->errors());
            redirect('user/login', 'refresh'); //use redirects instead of loading views for compatibility with MY_Controller libraries
        }

我使用ionauth进行身份验证。

我在哪里做错了?请帮忙。

0 个答案:

没有答案
相关问题