aspose file tools*
The moose likes JForum and the fly likes How to use another user's database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "How to use another user Watch "How to use another user New topic
Author

How to use another user's database

Francesc Roure
Greenhorn

Joined: Jul 25, 2012
Posts: 2
I am thinking to integrate JForum to my Java application, but I don't know if JForum can works with a different user's database. On my site users already have accounts registered, and I want to take profit of these accounts. Is there a way to integrate these users to JForum and use the login they make in the application?

Thanks.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31079
    
163

You could run a script to change the user ids to be unique to your database and then import the table. In other words:

1) Set sequence on your database to resume at 100000 or something high.
2) Add 50000 to all userids in source database
3) Import source database to your database

And make sure there aren't duplicate usernames.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Francesc Roure
Greenhorn

Joined: Jul 25, 2012
Posts: 2
The idea is to have the same IDs in both databases?

I don't know if it's going to resolve the problem. I want logged users in my site can use the forum without have to login again. In my database every user have a username, and I want use it as forum's username.
Maybe I am going to change jforum's core to achieve it.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31079
    
163

Oh. I thought you wanted to do a one time migration.

To accept a login from another site, you don't need to migrate. But you do need to change the code (two recognized two databases.) And have unique ids or a formula to make the ids unique.
Toni Mergeani
Greenhorn

Joined: Aug 26, 2014
Posts: 11
Francesc Roure wrote:I am thinking to integrate JForum to my Java application, but I don't know if JForum can works with a different user's database. On my site users already have accounts registered, and I want to take profit of these accounts. Is there a way to integrate these users to JForum and use the login they make in the application?

Thanks.



Hi, I want the exact same thing. Did you found out how to do it?. Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use another user's database