05-14-2008, 09:22 AM
[eluser]v33s[/eluser]
Hi, I am using ez_Auth and I have to solve the problem about registration
I got this message when i press button Register:
My controller:
What`s the problem?
Hi, I am using ez_Auth and I have to solve the problem about registration

I got this message when i press button Register:
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined property: Register::$ezauth
Filename: controllers/register.php
Line Number: 13
Fatal error: Call to a member function authorize() on a non-object in C:\Program Files\VertrigoServ\www\xxx\application\controllers\register.php on line 13
My controller:
Code:
<?php
class Register extends Controller
{
function __contruct()
{
parent::Controller();
$this->load->model('EzAuth_Model', 'ezauth');
}
function index()
{
$data = array();
$rules = array(
'username' => 'trim|required|min_length[5]|max_length[30]',
'email' => 'trim|required|valid_email',
'password' => 'required|matches[password_repeat]',
'password_repeat' => 'required');
$fields = array(
'username' => 'username',
'email' => 'email',
'password' => 'pass',
'password_repeat' => 'pass repeat'
);
$this->validation->set_rules($rules);
$this->validation->set_fields($fields);
if ($this->validation->run())
{
$inp = array(
'ez_users' => array(
'username' => $this->input->post('username'),
'email' => $this->input->post('email')
),
'ez_access_keys' => array(
'profile_view' => 'user',
'peofile_edit' => 'user',
'profile_payment' => 'user',
'profile_add' => 'user',
'profile_logout' => 'user',
),
'password' => $this->input->post('password'),
);
$user_reg = $this->ezauth->register($inp);
if ($user_reg['reg_ok'] == 'yes') {
$v_code = $user_reg['code'];
$message = 'msg !!!!!!';
$this->_send_mail($inp['ez_users']['email'], 'verify', $message);
}
if ($user_reg['reg_ok'] == 'yes') {
$this->load->view('messages/reg_ok');
} else {
$data['disp_error'] = $user_reg['error'];
}
}
$this->load->view('register_view', $data);
}
What`s the problem?