From 205380b22e8496b43787ba51256615673fd412c4 Mon Sep 17 00:00:00 2001 From: lostlian Date: Wed, 7 Oct 2015 18:12:45 -0500 Subject: [PATCH 1/3] Set definition as not mandatory parameter for create_group The $definition parameter was a required parameter and it is not like the documentation. --- application/libraries/Aauth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 3be029f9..007b572a 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -1157,9 +1157,10 @@ function hash_password($pass, $userid) { * Create group * Creates a new group * @param string $group_name New group name + * @param string $definition Description of the group * @return int|bool Group id or FALSE on fail */ - public function create_group($group_name, $definition) { + public function create_group($group_name, $definition = '') { $query = $this->aauth_db->get_where($this->config_vars['groups'], array('name' => $group_name)); From dce098ffcba01c743c2763c376942e6fbbbb68ea Mon Sep 17 00:00:00 2001 From: lostlian Date: Sat, 10 Oct 2015 08:51:53 -0500 Subject: [PATCH 2/3] Fix for depreciated valid_email function Fix for depreciated valid_email function --- application/libraries/Aauth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 007b572a..f36f6a33 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -789,7 +789,8 @@ public function update_user($user_id, $email = FALSE, $pass = FALSE, $name = FAL $this->error($this->CI->lang->line('aauth_error_update_email_exists')); $valid = FALSE; } - if (!valid_email($email)){ + $valid_email = (bool) filter_var($email, FILTER_VALIDATE_EMAIL); + if (!$valid_email){ $this->error($this->CI->lang->line('aauth_error_email_invalid')); $valid = FALSE; } From da36535250fbd0df57a1ecc179bf851bc3bbdeb4 Mon Sep 17 00:00:00 2001 From: lostlian Date: Sat, 10 Oct 2015 10:10:52 -0500 Subject: [PATCH 3/3] Fix depreciated valid email Fix depreciated valid email --- application/libraries/Aauth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index f36f6a33..0aed7b70 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -713,7 +713,8 @@ public function create_user($email, $pass, $name='') { $this->error($this->CI->lang->line('aauth_error_email_exists')); $valid = FALSE; } - if (!valid_email($email)){ + $valid_email = (bool) filter_var($email, FILTER_VALIDATE_EMAIL); + if (!$valid_email){ $this->error($this->CI->lang->line('aauth_error_email_invalid')); $valid = FALSE; }