3 changed files with 488 additions and 395 deletions
@ -34,10 +34,10 @@ $config['aauth'] = array( |
|||||||
// perms to group |
// perms to group |
||||||
'perm_to_group' => 'aauth_perm_to_group', |
'perm_to_group' => 'aauth_perm_to_group', |
||||||
// pm table |
// pm table |
||||||
'pm' => 'aauth_pm', |
'pms' => 'aauth_pms', |
||||||
|
|
||||||
|
|
||||||
// remember time // 60*60*24*3 (default 3 days) |
// remember time |
||||||
'remember' => ' +3 days', |
'remember' => ' +3 days', |
||||||
|
|
||||||
// pasword maximum char long (min is 4) |
// pasword maximum char long (min is 4) |
||||||
@ -50,14 +50,15 @@ $config['aauth'] = array( |
|||||||
// default 10 times in one minute |
// default 10 times in one minute |
||||||
'try' => 10, |
'try' => 10, |
||||||
|
|
||||||
|
// to register email verifitaion need? true / false |
||||||
|
'verification' => false, |
||||||
|
|
||||||
// system email. |
// system email. |
||||||
'email' => '[email protected]', |
'email' => 'admin@admin.com', |
||||||
'name' => 'Emre Akay', |
'name' => 'Emre Akay', |
||||||
'subject' => 'Account Vertification', |
'subject' => 'Account Vertification', |
||||||
'reset' => 'Pasword Reset', |
'reset' => 'Pasword Reset', |
||||||
|
|
||||||
// to register email verifitaion need? true / false |
|
||||||
'verification' => true, |
|
||||||
|
|
||||||
// error mesages |
// error mesages |
||||||
// change to your language |
// change to your language |
||||||
@ -80,6 +81,8 @@ $config['aauth'] = array( |
|||||||
'exceeded' => 'Login try limit exceeded.', |
'exceeded' => 'Login try limit exceeded.', |
||||||
'no_user' => 'User not Exist', |
'no_user' => 'User not Exist', |
||||||
'group_exist' => 'Group already exists', |
'group_exist' => 'Group already exists', |
||||||
|
'self_pm' => 'It is not reasonable to send pm to yourself :)', |
||||||
|
'no_pm' => 'Pm not found', |
||||||
|
|
||||||
//info |
//info |
||||||
'already_member' => 'User already member of group', |
'already_member' => 'User already member of group', |
||||||
|
@ -8,7 +8,7 @@ if (!defined('BASEPATH')) |
|||||||
* @property Login_control $Login_control |
* @property Login_control $Login_control |
||||||
* @property Aauth $aauth Description |
* @property Aauth $aauth Description |
||||||
*/ |
*/ |
||||||
class Login extends CI_Controller { |
class Example extends CI_Controller { |
||||||
|
|
||||||
public function __construct() { |
public function __construct() { |
||||||
parent::__construct(); |
parent::__construct(); |
||||||
@ -16,10 +16,17 @@ class Login extends CI_Controller { |
|||||||
$this->load->library("Aauth"); |
$this->load->library("Aauth"); |
||||||
} |
} |
||||||
|
|
||||||
function deneme(){ |
public function index() { |
||||||
|
|
||||||
echo "<pre>"; |
if ($this->aauth->login('[email protected]', 'password', true)) |
||||||
|
echo 'tmm'; |
||||||
|
|
||||||
|
//echo date("Y-m-d H:i:s"); |
||||||
|
} |
||||||
|
|
||||||
|
function debug(){ |
||||||
|
|
||||||
|
echo "<pre>"; |
||||||
|
|
||||||
print_r( |
print_r( |
||||||
//$this->aauth->is_admin() |
//$this->aauth->is_admin() |
||||||
@ -45,15 +52,22 @@ class Login extends CI_Controller { |
|||||||
//$this->aauth->send_pm(1,2,'asd') |
//$this->aauth->send_pm(1,2,'asd') |
||||||
//$this->session->flashdata('d') |
//$this->session->flashdata('d') |
||||||
//$this->aauth->add_member(1,1) |
//$this->aauth->add_member(1,1) |
||||||
$this->aauth->create_user('[email protected]','d') |
//$this->aauth->create_user('[email protected]','d') |
||||||
|
//$this->aauth->send_pm(1,2,'asd','sad') |
||||||
|
//$this->aauth->list_pms(1,0,3,1) |
||||||
|
//$this->aauth->get_pm(6, false) |
||||||
|
//$this->aauth->delete_pm(6) |
||||||
|
//$this->aauth->set_as_read_pm(13) |
||||||
|
//$this->aauth->create_group('aa') |
||||||
|
$this->aauth->create_perm('asdda') |
||||||
|
//'' |
||||||
|
|
||||||
); |
); |
||||||
|
|
||||||
echo '<br>---- errrroor --- <br>'; |
echo '<br>---- error --- <br>'; |
||||||
echo $this->aauth->get_errors(); |
echo $this->aauth->get_errors(); |
||||||
|
|
||||||
echo '<br>---- infoviç --- <br>'; |
echo '<br>---- info --- <br>'; |
||||||
echo $this->aauth->get_infos(); |
echo $this->aauth->get_infos(); |
||||||
|
|
||||||
echo "</pre>"; |
echo "</pre>"; |
||||||
@ -71,7 +85,7 @@ class Login extends CI_Controller { |
|||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
function ayar() { |
function settings() { |
||||||
|
|
||||||
//echo $this->aauth->_get_login_attempts(4); |
//echo $this->aauth->_get_login_attempts(4); |
||||||
//echo $this->aauth->get_user_id('[email protected]'); |
//echo $this->aauth->get_user_id('[email protected]'); |
||||||
@ -79,14 +93,6 @@ class Login extends CI_Controller { |
|||||||
//$this->aauth->_reset_login_attempts(1); |
//$this->aauth->_reset_login_attempts(1); |
||||||
} |
} |
||||||
|
|
||||||
public function index() { |
|
||||||
|
|
||||||
if ($this->aauth->login('[email protected]', '111111', true)) |
|
||||||
echo 'tmm'; |
|
||||||
|
|
||||||
//echo date("Y-m-d H:i:s"); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
public function is_loggedin() { |
public function is_loggedin() { |
||||||
|
|
||||||
|
Loading…
Reference in new issue