Dears,
When I want to see all the site users (i.e Site administration > Users > Accounts > Browse list of users) I get the following error:
Exception - Using $this when not in object context
Would you please help me to fix the problem?
Thanks a lot.
Please don't post the same question twice with different headings, it only confuses things.
Clearly something is wrong, here. This is a really rare error, so rare, I don't believe I have ever seen it before. I have no idea how I could even replicate this error. So:
Who set up your Moodle?
What version is it?
What database are you using?
What is the server environment?
To get to the Site Admin menu, you have to be logged in as an Admin, so have permissions been set properly?
Who has access to the raw code?
Who's been fiddling with Moodle core code? (Definite NO-NO!)
Best option: Replace the code. Download the next version, or perhaps two steps, and use that to replace your code base. You could spend ages looking for a solution and cause other problems, so update your code base.
It seems like there is an issue with the php version you are using, it might be the issue that your Moodle version is not compatible with the Php version.
i hope you may get some help from the below link :-
https://moodle.org/mod/forum/discuss.php?d=342685
Regards,
vaibhav Sharma