epsylon3/torrentflux — Issue #19: Changing users password/type/offline failing
Author: smalla
Created: 2012-01-11 13:42:11+00:00
State: open

change in /inc/functions/functions.admin.php

1114c1114
< function updateThisUser($user_id, $org_user_id, $pass1, $userType, $hideOffline) {
---
> function updateThisUser($user_id, $org_user_id, $pass1, $userType, $hideOffline, $email_address) {
1126c1126,1127
< if ($pass1 != "")
---
> $rec['email_address'] = $email_address;
> if ($pass1 != "") {
1127a1129
> }

and /inc/iid/admin/updateUser.php
48c48
< if ((IsUser($org_user_id)) && (!IsUser($user_id)) && ($user_id != '') && ($user_id != $org_user_id) && ($passwordCheck === true)) {
---
> if (((IsUser($org_user_id)) && (!IsUser($user_id)) && ($user_id != '') && ($passwordCheck === true)) || (($user_id == $org_user_id) && ($passwordCheck === true)) ) {
56c56
< @header("location: admin.php");
---
> @header("location: admin.php?op=editUser&user_id=".urlencode($user_id));
58c58
< } elseif($email_address != "") {
---
> } /*elseif($email_address != "") {
62c62
< }
---
> }*/