Commit 54d77f4f authored by gimpster's avatar gimpster

Found some typos. While searching for the $aux variable I found this

code twice:

    $aux = Array();
    foreach ($res as $key => $val) {
      $aux[$key] = $val;
    }

The problem is, that the $aux variable isn't used afterward in those
methods, so what does the code do?
parent 47c1f3e3
...@@ -743,7 +743,7 @@ class UsersLib extends TikiLib { ...@@ -743,7 +743,7 @@ class UsersLib extends TikiLib {
$cant = 0; $cant = 0;
$ret = array(); $ret = array();
while ($res = $result->fetchRow()) { while ($res = $result->fetchRow()) {
if ($group && $this->group_has_permission($group, $aux['permName'])) { if ($group && $this->group_has_permission($group, $res['permName'])) {
$hasPerm = 'y'; $hasPerm = 'y';
} else { } else {
$hasPerm = 'n'; $hasPerm = 'n';
...@@ -874,7 +874,7 @@ class UsersLib extends TikiLib { ...@@ -874,7 +874,7 @@ class UsersLib extends TikiLib {
$now=date("U"); $now=date("U");
$new_pass_due=$now+(60*60*24*$pass_due); $new_pass_due=$now+(60*60*24*$pass_due);
$query = "insert into `users_users`(`login`,`password`,`email`,`provpass`,`registrationDate`,`hash`,`pass_due`,`created`) values(?,?,?,?,?,?,?,?)"; $query = "insert into `users_users`(`login`,`password`,`email`,`provpass`,`registrationDate`,`hash`,`pass_due`,`created`) values(?,?,?,?,?,?,?,?)";
$result = $this->query($queryi,array($user,$pass,$email,$provpass,$now,$hash,$new_pass_due,$now)); $result = $this->query($query,array($user,$pass,$email,$provpass,$now,$hash,$new_pass_due,$now));
$this->assign_user_to_group($user,'Registered'); $this->assign_user_to_group($user,'Registered');
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment