public List<User> listViewUser(int uprofile, int userId) {

        List<User> list = null;

        String queryLISTMSISDN = "";

        if (uprofile == 3) {
            queryLISTMSISDN = "select userid,fname,lname,baddress,haddress,utype,umobile,uemail,active from user ";
        } else {
            queryLISTMSISDN = "select userid,fname,lname,baddress,haddress,utype,umobile,uemail,active from user where"
                    + " userid='" + userId + "' or uprofile='" + userId + "'";
        }
        try {
            m_Connection = getDbConnection().getConnection();
            m_Statement = m_Connection.createStatement();

            m_ResultSet = m_Statement.executeQuery(queryLISTMSISDN);

            while (m_ResultSet.next()) {
                if (list == null) {
                    list = new ArrayList<User>();
                }
                User user = new User();
                user.setUserId(m_ResultSet.getInt(1));
                user.setFname(m_ResultSet.getString(2));
                user.setLname(m_ResultSet.getString(3));
                user.setBaddress(m_ResultSet.getString(4));
                user.setHaddress(m_ResultSet.getString(5));
                user.setUtype(m_ResultSet.getString(6));
                user.setUmobile(m_ResultSet.getString(7));
                user.setUemail(m_ResultSet.getString(8));
                user.setActive(m_ResultSet.getInt(9));
                list.add(user);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (m_ResultSet != null) {
                    m_ResultSet.close();
                }
                if (m_Statement != null) {
                    m_Statement.close();
                }
                if (m_Connection != null) {
                    m_Connection.close();
                }
            } catch (SQLException ex) {
                ex.printStackTrace();

            }
        }
        return list;

    }