<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Seguranca extends CI_Controller
{
    
    //ver email da ativacao
    public function index() 
    {
        //var_dump('teste');break;
    }
    
    function reenvio()
	{
	    
	    //var_dump('teste');break;
	    
		if (!$this->tank_auth->is_logged_in(FALSE)) {							// not logged in or activated
			redirect('painel');

		} else {
			$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');

			$data['errors'] = array();

			if ($this->form_validation->run()) {								// validation ok
				/*if (!is_null($data = $this->tank_auth->change_email(
						$this->form_validation->set_value('email')))) {			// success

					$data['site_name']	= $this->config->item('website_name', 'tank_auth');
					$data['activation_period'] = $this->config->item('email_activation_expire', 'tank_auth') / 3600;

					$this->_send_email('activate', $data['email'], $data);

					$this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));

				} else {
					$errors = $this->tank_auth->get_error_message();
					foreach ($errors as $k => $v)	$data['errors'][$k] = $this->lang->line($v);
				}*/
			}
			
			$this->load->view('auth/reenvia_view', $data);
		}
	}
}