Welcome Guest, Not a member yet? Register   Sign In
Undefined property
#6

[eluser]ibnclaudius[/eluser]
I don't know why, but running in autoload works.

The error also occurs with:
Code:
$this->load->library('encrypt');

:SSS

Controller:
Code:
<?php

class Site extends CI_Controller
{
public function __construct()
{
  parent::__construct();
  
  $this->load->helper(array('url'));
  $this->load->library(array('mb_auth_lib', 'session'));
  
  $this->output->enable_profiler(true);
}

public function index()
{
  redirect('/entrar', 'location');
}

public function login()
{
  $this->load->library('form_validation');
  
  if ($this->input->server('REQUEST_METHOD') === 'POST')
  {
   $this->load->helper('form');
  
   if ($this->input->post('action') === 'LOGIN')
   {
    $this->form_validation->set_rules('email', 'email', 'required');
    $this->form_validation->set_rules('password', 'password', 'required');
    
    if ($this->form_validation->run() !== FALSE)
    {
     $this->load->library('encrypt');
      
     $data = array('email' => $this->input->post('email'),
       'password' => $this->encrypt->sha1($this->input->post('password'))
     );
    
     if ($this->mb_auth_lib->login($data))
     {
      redirect('usuario/mural', 'location');
     }
     else
     {
      $data['inexistent_login'] = TRUE;
     }
    }
   }
  }
  
  $data['title'] = 'MeuBoletim';
  $data['page'] = 'login';
  
  $this->load->view('layout', $data);
}
}/


Messages In This Thread
Undefined property - by El Forum - 01-22-2012, 09:05 PM
Undefined property - by El Forum - 01-22-2012, 09:21 PM
Undefined property - by El Forum - 01-22-2012, 09:40 PM
Undefined property - by El Forum - 01-22-2012, 09:46 PM
Undefined property - by El Forum - 01-22-2012, 09:52 PM
Undefined property - by El Forum - 01-23-2012, 03:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB