No meu caso este era o meu problema:
“Check the value of mnet_localhost_id in the mdl_config database table. It’s normally 1 but must match the mnet_hostid field in your user records in the mdl_user table for the user to be recognised. It can sometimes get changed spuriously during upgrades or site migrations.”

Bastou mudar no mdl_config a opção de 3 para 1 e voilá!