Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 977... Línea 977...
977
 
977
 
978
    if (isset($USER->access)) {
978
    if (isset($USER->access)) {
979
        $ACCESSLIB_PRIVATE->accessdatabyuser[$USER->id] = $USER->access;
979
        $ACCESSLIB_PRIVATE->accessdatabyuser[$USER->id] = $USER->access;
Línea -... Línea 980...
-
 
980
    }
-
 
981
 
-
 
982
    // Unfortunately, we can't use the $ACCESSLIB_PRIVATE->dirtyusers array because it is not available in CLI.
-
 
983
    // So we need to check if the user has been marked as dirty or not in the cache directly.
-
 
984
    // This will add additional queries to the database, but it is the best we can do.
-
 
985
    if (CLI_SCRIPT && !empty($ACCESSLIB_PRIVATE->accessdatabyuser[$userid])) {
-
 
986
        if (get_cache_flag('accesslib/dirtyusers', $userid, $ACCESSLIB_PRIVATE->accessdatabyuser[$userid]['time'])) {
-
 
987
            unset($ACCESSLIB_PRIVATE->accessdatabyuser[$userid]);
-
 
988
        }
980
    }
989
    }
981
 
990
 
982
    if (!isset($ACCESSLIB_PRIVATE->accessdatabyuser[$userid])) {
991
    if (!isset($ACCESSLIB_PRIVATE->accessdatabyuser[$userid])) {
983
        if (empty($userid)) {
992
        if (empty($userid)) {
984
            if (!empty($CFG->notloggedinroleid)) {
993
            if (!empty($CFG->notloggedinroleid)) {