Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Dec 17, 2013
2 parents cfc2676 + e5f159f commit 72b8bfe
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -189,6 +189,8 @@ public function detectRemoteUserId($repoObject)
if ($ssh2->login($user, $pass)) {
$output = $ssh2->exec( 'id' );

$ssh2->disconnect();

if (trim($output != "")) {
$res = sscanf($output, "uid=%i(%s) gid=%i(%s) groups=%i(%s)");
preg_match_all("/(\w*)=(\w*)\((\w*)\)/", $output, $matches);
Expand All @@ -199,9 +201,9 @@ public function detectRemoteUserId($repoObject)
return array($uid, $gid);
}
}

$ssh2->disconnect();
}
unset($ssh2);

return array(null,null);
}

Expand Down

0 comments on commit 72b8bfe

Please sign in to comment.