Skip to content

Commit

Permalink
test if username is a string (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
sualko committed Jun 20, 2017
1 parent f627aae commit f7614a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ajax/getSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ function validateBoolean($val)
}

if (validateBoolean($config->getAppValue('ojsxc', 'timeLimitedToken'))) {
if($data['xmpp']['username'] == null) {
if(!is_string($data['xmpp']['username'])) {
$data['xmpp']['username'] = $currentUID;
}

$jid = $data['xmpp']['username'] . '@' . $data['xmpp']['domain'];
$expiry = time() + 60*60;
$secret = $config->getAppValue('ojsxc', 'apiSecret');
Expand Down

0 comments on commit f7614a4

Please sign in to comment.