function user_login_webservice($username, $password) {
        global $CFG, $DB;
        // special web service login
        if ($user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
            return validate_internal_user_password($user, $password);
        }
        return false;
    }
function user_login_webservice($username, $password) {
        global $CFG, $DB;
        // special web service login
        if ($user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
            return validate_internal_user_password($user, $password);
        }
        return false;
    }
function user_login_webservice ( $ username , $ password ) { global $ CFG , $ DB ; // special web service login if ( $ user = $ DB -> get_record ( 'user' , array ( 'username' => $ username , 'mnethostid' => $ CFG -> mnet_localhost_id ) ) ) { return validate_internal_user_password ( $ user , $ password ) ; } return false ; }
Custom auth hook for web services.
@param string $username
@param string $password
@return bool success
Custom auth hook for web services .