Skip to content

Commit 25b1b68

Browse files
committed
MOBILE-3556 Login: Send extra parameter on token.php check
The extra parameter can be used by Moodle to avoid throwing an error in server logs because other parameters e.g. username are not supplied.
1 parent 1e59f78 commit 25b1b68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/providers/sites.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,8 @@ export class CoreSitesProvider {
641641
* @return A promise to be resolved if the site exists.
642642
*/
643643
siteExists(siteUrl: string): Promise<void> {
644-
return this.http.post(siteUrl + '/login/token.php', {}).timeout(this.wsProvider.getRequestTimeout()).toPromise()
644+
return this.http.post(siteUrl + '/login/token.php', { appsitecheck: 1 }).
645+
timeout(this.wsProvider.getRequestTimeout()).toPromise()
645646
.catch(() => {
646647
// Default error messages are kinda bad, return our own message.
647648
return Promise.reject({error: this.translate.instant('core.cannotconnecttrouble')});

0 commit comments

Comments
 (0)