Skip to content

Commit

Permalink
Merge branch 'master' of github.com:JetFault/Relationship-Extender
Browse files Browse the repository at this point in the history
  • Loading branch information
JetFault committed Mar 25, 2012
2 parents 9185c0c + 1a6ac16 commit 2fb2993
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions user.php
@@ -1,7 +1,14 @@
<?php


function deleteUser
function deleteUser($userID){
$connection = new Mongo();
$db = $connection->allusers->list;

$criteria = array('ID' => $userID);

$db->remove($criteria);
}


function createUser($userID, $userName) {
Expand All @@ -18,14 +25,13 @@ function getName($userID) {
$connection = new Mongo();

$db = $connection->allusers->list;
echo $userID;
$result = $db->find();
/*
$criteria = array('ID' => $userID);
$result = $db->find($criteria);

foreach ($result as $ob){
echo $ob["name"];
$doc = $ob["name"];
}
*/
return $result["name"];
return $doc;
}
function getNumber($userID) {
$db = $connection->allusers->list;
Expand Down

0 comments on commit 2fb2993

Please sign in to comment.