The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
edit bio - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: edit bio (/showthread.php?tid=288)



edit bio - Sebastian - 09-28-2016

Hi,

Sorry, still using Version 4.1.3. After adding and deleting several users, I noticed that editing the bio in edit_profile.php had no effect, i.e. nothing has been written to the data base.
Thus, I found that in the data base in the profiles tab, the id and the user_id can differ.
So I think that in edit_profile.php the data base update has to use the id and not the user_id.
A change of
Code:
$db->update('profiles',$userID,$fields);
to
Code:
$db->update('profiles',$thisProfile->id,$fields);
worked for me.

Cheers,
Sebastian




edit bio - mudmin - 09-28-2016

Hmm. Interesting. I was pretty sure that was patched. Is there a reason you can't patch to 4.1.5?


edit bio - Sebastian - 09-28-2016

Sure, I will patch to 4.1.5 soon. However, I have looked into 4.1.4b and 4.1.5 and I've not found a new edit_profile.php ... or did you fix this issue somehow differently?


edit bio - mudmin - 09-28-2016

Well, I'm not in front of the code, so I'll have to look but either somehow you missed a patch somewhere along the way or I reintroduced a bug I've already fixed. That wouldn't be the first time. I did that in 4.2 also. Either way, thanks for pointing it out....I will definitely take a look.


edit bio - Sebastian - 09-28-2016

Definitely, I will not exclude having missed a patch ;-) Thanks again for taking a look.


edit bio - mudmin - 10-16-2016

I did confirm that this bug was fixed a while ago and isn't in 4.1.5. I'll push it out anyway just in case I reintroduced it, but line 29 should read
$userID = $user->data()->id;


edit bio - Sebastian - 10-18-2016

Thanks for checking that. I can also confirm that line 29 reads exactly as you mentioned. However it is still not clear to me. Have other users not observed these problems? As I said above, the userID cannot work in this case, if the DB id and the userID differ, thus I needed to use $thisProfile->id instead of $userID.
Or have you fixed this issue by guaranteeing that the DB id (in the profiles tab) and the userID always are the same?