function serveUserInformation(req, res){
        var error;

        var query = "SELECT \"first_name\", \"last_name\", \"username\" FROM USERS WHERE \"username\" = ?";
        dashDB.query(query, [req.params.username.replace(/\W/g, '')], function(err, response){
            if(err){
                logger.error("[users.select] " + err.message);
                res.status(500).send("Server connection error");
            } else if(response.length == 0){
                res.status(404).send("User not found");
            } else {
                res.status(200).send(response[0]);
            }
        });
  
}
/**
 * Serve user credentials from SQL database
 * @param req {Object} The request from the client
 * @param req.params.username {String} Username of the client
 * @param res {Object} The response for the client
 */
Serve user credentials from SQL database
@param req {Object} The request from the client
@param req.params.username {String} Username of the client
@param res {Object} The response for the client
Serve user credentials from SQL database @param req { Object } The request from the client @param req . params . username { String } Username of the client @param res { Object } The response for the client
function serveUserInformation(req, res){
        var error;
        var query = "SELECT \"first_name\", \"last_name\", \"username\" FROM USERS WHERE \"username\" = ?";
        dashDB.query(query, [req.params.username.replace(/\W/g, '')], function(err, response){
            if(err){
                logger.error("[users.select] " + err.message);
                res.status(500).send("Server connection error");
            } else if(response.length == 0){
                res.status(404).send("User not found");
            } else {
                res.status(200).send(response[0]);
            }
        });
}
function serveUserInformation ( req , res ) { var error ; var query = "SELECT \"first_name\", \"last_name\", \"username\" FROM USERS WHERE \"username\" = ?" ; dashDB . query ( query , [ req . params . username . replace ( / \W / g , '' ) ] , function ( err , response ) { if ( err ) { logger . error ( "[users.select] " + err . message ) ; res . status ( 500 ) . send ( "Server connection error" ) ; } else if ( response . length == 0 ) { res . status ( 404 ) . send ( "User not found" ) ; } else { res . status ( 200 ) . send ( response [ 0 ] ) ; } } ) ; }
Serve user credentials from SQL database
 @param req {Object} The request from the client
 @param req.params.username {String} Username of the client
 @param res {Object} The response for the client
Serve user credentials from SQL database @param req { Object } The request from the client @param req . params . username { String } Username of the client @param res { Object } The response for the client