Active users not appearing in the User Table

Re: Active users not appearing in the User Table

by Randy Thornton -
Number of replies: 2
Picture of Documentation writers

Sounds like something is not right: are you sure you are looking at the same database both times?

I'd check the db name in the config.php to be sure. And also make sure that the database user name is correct and has the proper privileges in the db as it should.

Consider adding the Adminer plugin to check the database from inside Moodle as the moodle database user.

As a sanity check, on the database run the query

SELECT COUNT(id) from mdl_user WHERE deleted = 0;
it should return exactly one more  (because it includes 'guest')  than the number of active users you see in at the top of the Browse list of users page.

When you manually create a user or upload them, it should immediately add them to the database. It doesn't wait for the email to go out or the user to be confirmed or anything.

In reply to Randy Thornton

Re: Active users not appearing in the User Table

by Colin Thorbinson -

Hi Randy,

Thank you for your quick response.

This is a bit worrying, I've ran your query and once again Moodle shows that I have 3182 users while the SQL Query you provided only returns 1048.

I've scheduled some time where I will be able to look at the Moodle paths with the possibility of incorrect database permissions or paths. It just seems strange how some users appear in the user table where others do not.

Do you have any further suggestions if the paths and permissions are correct?

Thanks!

In reply to Colin Thorbinson

Re: Active users not appearing in the User Table

by Randy Thornton -
Picture of Documentation writers
If paths, users, and privileges all turn out good, and the sql service has been restarted, the next thing I would look at would be indexing, and reindexing the tables.