Welcome Guest, Not a member yet? Register   Sign In
flexi auth - A user authentication library for CodeIgniter

[eluser]NotSmilie[/eluser]
Hi,
So I decided to put it to the test, and it seems to work great Big Grin

My add function creates a new user:
Code:
function add(){
        if(!empty($_POST)){
            $user_data = array(
                'uacc_credits' => '0'
            );
            $group_id = 1;
            $data['res'] = $this->flexi_auth->insert_user($_POST['uacc_email'], $_POST['uacc_username'], $_POST['uacc_password'], $user_data, $group_id, $_POST['uacc_active']);
            $data['message'] = (! isset($data['message'])) ? $this->session->flashdata('message') : $data['message'];
        }

        $data['page'] = 'user';
        $view = $this->load->view('user/create', $data, TRUE);
        $this->template->create_page('User', $view);
    }

My problem is about the messages. The function returns a bool, but as I can read, I can retrieve the exact message and the way I'm currently doing it appears to be wrong.

I want an error message if the creation fails, such as the email already exists, or was invalid, or username exists or is invalid etc..
How is this possible?


Messages In This Thread
flexi auth - A user authentication library for CodeIgniter - by El Forum - 03-06-2013, 08:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB