Skip to content

Commit

Permalink
Merge pull request #71 from lostlian/master
Browse files Browse the repository at this point in the history
Set $definition as an optional parameter in create_group and fix depreciated valid_email function
  • Loading branch information
Emre Akay committed Oct 12, 2015
2 parents a683c62 + da36535 commit 50d7a4d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -789,7 +790,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;
}
Expand Down Expand Up @@ -1157,9 +1159,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));

Expand Down

0 comments on commit 50d7a4d

Please sign in to comment.