User table - Lastlogin field issue

User table - Lastlogin field issue

von Rafael Satiro -
Anzahl Antworten: 4

Hi everyone,

I have a issue in my Moodle (3.6.3) enviroment, this problem is really strange.

I have some users that login in my Moodle and consume ours quiz, foruns etc but when i get the information in my DB they dont have any information in the table USER on field lastlogin, but they have information on lastaccess at the same table.

This issue does'nt happing for all student, i have a lot of results that's works.

Someone here get the same issue? Someone knows what can be?

Thank you so much

Best Regards

Als Antwort auf Rafael Satiro

Re: User table - Lastlogin field issue

von Ken Task -
Nutzerbild von Particularly helpful Moodlers

May/May not be strange .. does your Moodle force login to see anything contained therein?   Have any Guest accessible courses/content?  Some user in internet could have bookmarked guest course and attempting to go directly to that course without hitting front page.

Consider lastaccess like a search engine bot (google/bing/other) trying to index your site ... lastlogin to be where a user really did initiate and complete a login.

Since you see an IP address ... also cross-reference your web server's access log ... which is a raw server log not seen in Moodle logs.

'SoS', Ken

Als Antwort auf Ken Task

Re: User table - Lastlogin field issue

von Rafael Satiro -

Hi Ken,

i dont have any guest acessible course/content.

I run some querys in the moodle log table and i found a lot of logs to the users with this problem:

Als Antwort auf Rafael Satiro

Re: User table - Lastlogin field issue

von Ken Task -
Nutzerbild von Particularly helpful Moodlers

Did you find the same ip address by query of mdl_user table?

Suggest looking at true web server logs for the ip address to get a truer picture of issues.

If you are running linux ... I have a simple bash shell script to facilitate:

echo 'Searches ssl_access_log and ssl_error_log for parameter given: '$1;
echo 'Paused ....';
read $keypress;
grep $1 /var/log/httpd/ssl_*_log | sort | uniq -c | sort -n

I call the above 'slog' and it could search all logs for the web server rather than just the ssl logs.

'SoS', Ken

Als Antwort auf Rafael Satiro

Re: User table - Lastlogin field issue

von Howard Miller -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Peer reviewers Nutzerbild von Plugin developers
lastaccess is updated by all sorts of things.

For example, reading an email with links back to Moodle can be enough (I think).