original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Custom auth hook for web services.
  @param string $username
  @param string $password
  @return bool success
docstring_tokens: Custom auth hook for web services .