Skip to content

Commit

Permalink
username.login implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
jangaraj committed May 7, 2024
1 parent c79ec29 commit 9fbc251
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions js/jsonrpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,22 @@ var jsonRpc = (function($) {
if (typeof params.xdebugsid !== 'undefined') {
hostname += '?XDEBUG_SESSION_START=' + params.xdebugsid;
}

this.call('user.login', {user: user, password: pass}, function(result) {
sessionid = result;
$('#connections').modal('hide');
$("#connInfo").text('Connected to ' + config.host.replace('https://', '').replace('http://',''));
jsonRpc.versioning();
});
try {
this.call('username.login', {user: user, password: pass}, function(result) {
sessionid = result;
$('#connections').modal('hide');
$("#connInfo").text('Connected to ' + config.host.replace('https://', '').replace('http://',''));
jsonRpc.versioning();
});
}
catch (e) {
this.call('user.login', {user: user, password: pass}, function(result) {
sessionid = result;
$('#connections').modal('hide');
$("#connInfo").text('Connected to ' + config.host.replace('https://', '').replace('http://',''));
jsonRpc.versioning();
});
}
},

versioning: function() {
Expand Down

0 comments on commit 9fbc251

Please sign in to comment.