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
Error not find user profile - 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: Error not find user profile (/showthread.php?tid=264)



Error not find user profile - GePraxa - 09-13-2016

How to know if the query has any result?

When you are entering:
http://localhost/userspice/user_profile.php?id=blablabla

I would like to show a warning "error" or something other than the page being displayed. How could you do this?

when I put http://localhost/userspice/user_profile.php if an error message appears.


Error not find user profile - brian - 09-13-2016

That is an oversight on our part. @mudmin will need to fix that in the next 4.1.x release (I think there should at least be a 4.1.6 before 4.2).

I wrote something quick for the time being:

http://pastebin.com/uEAxyLcN

Replace the top "if(isset)....else" block with the pastebin above.


Error not find user profile - GePraxa - 09-13-2016

Thanks for the prompt response and helpful, just stay alert type Notice in each case:

http://localhost/userspice/user_profile.php?id=1
Notice: Undefined variable: thisUserID in D:\Google Drive\Servidores\local\userspice\user_profile.php on line 34

http://localhost/userspice/user_profile.php?id=blablabla
Notice: Undefined offset: 0 in D:\Google Drive\Servidores\local\userspice\classes\DB.php on line 155



Error not find user profile - brian - 09-13-2016

Wait, where did the user_profile.php file come from? We have user_settings.php and profile.php. The file the patch is for is profile.php


Error not find user profile - GePraxa - 09-13-2016

If it is correct, make some modifications to the file names and folder paths, but the code works as the original.


Error not find user profile - mudmin - 09-13-2016

Yep. Brian added this to the bug list and I'll push it out with the next release. The profile feature was never meant to be part of userspice. People just needed a quick example project on how to relate features to particular usernames, so I wrote it as a demo. This is definitely an oversight that I can fix and will probably be part of the next Debugging with Dan video.

On another note...obviously you are welcome to use UserSpice however you see fit, but we do provide a lot of tools to give you the opportunity to copy instead of modifying/renaming core userspice files. Just know that if you do away with core files, other features may not work after upgrades happen and you may be out of sync.

As always, when I push out a new release I also push a complete diff onto github. https://github.com/mudmin/UserSpice4/commit/0b4cb5d6e33d5367dc364c289cfc2725d5f7a2b3

Ideally, though, core files should be left alone if possible.



Error not find user profile - GePraxa - 09-14-2016

If you're right, but I'm not working on a project, it's just a matter of taste how everything works, I like to rename files, folders, move things around, to see how flexible is, there may come a time when no need as many files and when you actually need to delete something, I can react to errors.