diff --git a/application/controllers/example.php b/application/controllers/example.php
index 936e978..d9e129a 100644
--- a/application/controllers/example.php
+++ b/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() {
diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php
index b402c76..61cc7d9 100644
--- a/application/libraries/Aauth.php
+++ b/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 = '
'){
@@ -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 = '
'){
@@ -1592,7 +1596,7 @@ class Aauth {
$i++;
}
- return $msg;
+ echo $msg;
}
########################