Closed danielddltellez closed 5 years ago
Hi @danielddltellez Thank you for using this plugin. First of all you should figure out why your request takes 30 seconds. It shouldn't be that long on normally working moodle instances.
closing this one as I can't replicate it. Most likely the issue in the moodle instance itself.
Because it takes to enter moodle, it shows error after 30 seconds. How can I solve it, will it be the curl?
/**
function getloginurl($useremail, $firstname, $lastname, $username, $courseid = null, $modname = null, $activityid = null) { require_once('curl.php');
/ $param = [ 'user' => [ 'email' => $useremail ] ]; /
// $serverurl = $domainname . '/webservice/rest/server.php' . '?wstoken=' . $token . '&wsfunction=' . $functionname; // echo $serverurl; $curl = new curl; // The required library curl can be obtained from https://github.com/moodlehq/sample-ws-clients
$resp = $curl->post($serverurl, $params);
// echo "$path
"; } /* if (isset($modname) && isset($activityid)) { $path = '&wantsurl=' . urlencode("$domainname/mod/$modname/view.php?id=$activityid"); }
*/ return $loginurl.$path; }
$mail=$_GET['email']; $cid=$_GET['courseid']; $url = getloginurl("$mail", 'Carlos', 'Legorreta Garcia', 'carlos.legorreta', $cid, null, null);
header('Location: '.$url); die();