Browse Source

print_error and print_infos changed

develop
Emre Akay 11 years ago
parent
commit
ab95c6689b
  1. 10
      application/controllers/example.php
  2. 24
      application/libraries/Aauth.php

10
application/controllers/example.php

@ -21,7 +21,8 @@ class Example extends CI_Controller {
if ($this->aauth->login('admin@admin.com', 'password', true))
echo 'tmm';
else
echo 'hyr';
//echo date("Y-m-d H:i:s");
}
@ -161,9 +162,14 @@ class Example extends CI_Controller {
}
function create_user() {
$a = $this->aauth->create_user("ess@as.com", "asd", "asdasd");
echo "as";
$a = $this->aauth->create_user("aaasada@aaasda.com", "asd", "asdasd11");
print_r($this->aauth->get_user($a));
$this->aauth->print_errors();
}
public function is_banned() {

24
application/libraries/Aauth.php

@ -397,7 +397,9 @@ class Aauth {
$valid = false;
}
if (!$valid) { return false; }
if (!$valid) {
echo "2";
return false; }
$data = array(
'email' => $email,
@ -405,6 +407,8 @@ class Aauth {
'name' => $name,
);
echo "3";
if ( $this->CI->db->insert($this->config_vars['users'], $data )){
$user_id = $this->CI->db->insert_id();
@ -755,7 +759,8 @@ class Aauth {
$query = $this->CI->db->get( $this->config_vars['users'] );
$row = $query->row();
$data = [];
$data = array();
if ( $row->last_login_attempt == date("Y-m-d H:0:0")) {
@ -1516,10 +1521,9 @@ class Aauth {
}
/**
* Get Errors
* Return string of errors separated by delimiter
* Print Errors
* Prints string of errors separated by delimiter
* @param string $divider Separator for errors
* @return string String of errors separated by delimiter
*/
public function print_errors($divider = '<br />'){
@ -1534,7 +1538,7 @@ class Aauth {
$i++;
}
return $msg;
echo $msg;
}
/**
@ -1574,10 +1578,10 @@ class Aauth {
}
/**
* Get Info
* Return string of info separated by delimiter
* Print Info
* Print string of info separated by delimiter
* @param string $divider Separator for info
* @return string String of info separated by delimiter
*
*/
public function print_infos($divider = '<br />'){
@ -1592,7 +1596,7 @@ class Aauth {
$i++;
}
return $msg;
echo $msg;
}
########################

Loading…
Cancel
Save