We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

plugin errors | Forum

Senior Developer Leader
Senior Developer Feb 15 '20
When they click on a link domain.com/user/username it checks if the "username" is a valid registered user, and if so, it gets the ID and then checks if the logged user is authorized to view this profile.


The NOTICE was that if they click on a link domain.com/user/nonexistentuser, the function was returning null, there is no ID for nonexistent users (cannot get ID from null), that was the NOTICE. In the new code we assign 0 as default value for nonexisting users to avoid this issue, that's the only thing we are doing in there.
This line of code, has nothing to do with if the user is admin or not, it is just getting the ID of the current profile url that is being accessed by everybody (before the authorization checking, the admin checking is in the code below that).


Senior Developer.


The Forum post is edited by Senior Developer Feb 15 '20
Senior Developer Leader
Senior Developer Feb 15 '20

Quote from OW_Ghost i worry my live site will go down ....hmm....what is this code doing that you send ?
Quote from Marcus Do this...
Find line 92 right which is this right. 
$profileUserId = BOL_UserService::getInstance()->findByUsername($profileUserName)->id;

Above ir add this.. 

print_r(BOL_UserService::getInstance()->findByUsername($profileUserName)) ;
exit;
Save and refresh any page tell me what you see... 



Don't do this in a production site, it will break the profiles page.


Senior Developer.

Senior Developer Leader
Senior Developer Feb 15 '20


Quote from OW_Ghost

i was check database and my admin id is = 1 


is that normal?


Yes, it is normal.
OW-Ghost
OW-Ghost Feb 16 '20
okey understand now much better :)


i learn php more when developer explain like this :)


thanks Senior Developer

Marcus
Marcus Feb 16 '20
A little thanks would be nice you know. I'm done trying to help and not even getting some form of gratitude.

Good luck out. 
OW-Ghost
OW-Ghost Feb 16 '20
thanks Marcus for the help


i try learn how to read code and it fun to learn :)

The Forum post is edited by OW-Ghost Feb 16 '20
Ken
Ken Feb 16 '20
If you just go to privacy and select only me on who can see my presence on this site done! That easy no coding modification required
OW-Ghost
OW-Ghost Feb 16 '20

Quote from Ken If you just go to privacy and select only me on who can see my presence on this site done! That easy no coding modification required
i do that for only admin profile? or everyone?


but it is no good if later i want change that setting, then the issue still there.


hmmm but i think you right and maybe that was all that needed? 


but maybe the fix will cover if have any setting at all in privacy settings so better keep the fix?

OW-Ghost
OW-Ghost Feb 16 '20
i was check my admin account and it is set to "only me" ?


i confused what you try to say

OW-Ghost
OW-Ghost Feb 16 '20
update:


it was one "moderator" that have wrong privacy settings 


the moderator did have "everybody" on all


maybe thats why? i was only check admin account

OW-Ghost
OW-Ghost Feb 16 '20
but if this is true why is not the plugin owner make clearly instructions for need have this settings for the plugin not send 100000000 notice in error log?


hmmm....very confused and not very logical build and user friendly when no instructions how to setup moderators and admins with privacy settings?

Ken
Ken Feb 16 '20
Most of the old plugins are already exist on the new update 1.8.4 version and may need new touch ups here in there but follow oxwall GitHub periodically with the changes not just this forum
The Forum post is edited by Ken Feb 16 '20
OW-Ghost
OW-Ghost Feb 16 '20
okey so i not need this "hide admin" plugin you telling me?


But will the admins and moderators hide in skadate mobile apps is another question.


i need to test this first before i speak more about this...or maybe you know the answer?

The Forum post is edited by OW-Ghost Feb 16 '20
Ken
Ken Feb 16 '20
Most likely 1.8.4 was made for skaff app specif 
OW-Ghost
OW-Ghost Feb 16 '20

Quote from Ken Most likely 1.8.4 was made for skaff app specif 
okey it would bee great if you could confirm, i lazy to check it right now :)
Sergey Pryadkin Team
Sergey Pryadkin Feb 18 '20
Hello everybody. The problem has been fixed. The error appeared if username did't exist and user couldn't be found.  
OW-Ghost
OW-Ghost Feb 18 '20
okey great :) thank you Sergey
dave Leader
dave Feb 18 '20
How about a Oxwall update Sergey?  Since you still have team tag on your name i assume you are still part of the team. How about working on an update to Oxwall so that it installs with current php releases without issues, even just that would be something.  Add more if you wish but how about something, anything!  :)


You are still a team member?

Pages: « 1 2