public int getPrivs(Transaction trans, String username) throws SQLException, DatabaseException {
		trans=new JDBCTransaction(createConnection());
		Connection connection = ((JDBCTransaction)trans).getConnection();
		Statement stmt=connection.createStatement();
		int x = 0;
	
	    if(!validString(username))
	    	throw new SQLException("Trying to use invalid characters at username(admin check):'"+username+"'");
	
	    String query = "select privs from users where username like '"+username+"';";
	    ResultSet result = stmt.executeQuery(query);
	    if(result.next()) {
	    	String p = result.getString("privs");
	    	if      (p.equalsIgnoreCase("newbie")){x = 1;}
	    	else if (p.equalsIgnoreCase("regular")){x = 2;}
	    	else if (p.equalsIgnoreCase("champion")){x = 3;}
	    	else if (p.equalsIgnoreCase("moderator")){x = 4;}
	    	else if (p.equalsIgnoreCase("admin")){x = 5;}
	    } else {}
	    
	     return x;
	}