• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

SQL statements

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I have a question about the values from the database. Where can I put my sql statements to retrieve values from my database. And how can I call the variables.

I wan't to create a single sign on to edit the checkCookies() method. But I wan't to use my usernamen and password. But before I can use it I must retrieve the value from the database.

Please help,

Henk
[originally posted on jforum.net by henkie]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been thinking about the easiest way to make a single sing on. So here is what I think.

When I create a new user in my web apps in my own database, I also put the information in the jforum_users table and the jforum_user_groups table.

So the values of usernamen and password equals in both databases. When I wan't to approach the forum I get the username and password from my system and post them in a form to the forum. Like this:



So now I login to the forum with the username and password.

Let me know what you think about the idea.

Thanks,

Henk
[originally posted on jforum.net by henkie]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HHmm.. If you make your own implemenation of LoginAuthenticator (default implementation is DefaultLoginAuthenticator.java), then you don't need to do this replication of users by hand. JForum will automatically check if the incoming user exist in its database and, if it does not, insert it.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by making your own implementation. what for a query should I create then. One that gives al the users in my database or something.

Because there is an preparedstatement with an username and password. But what does that preparedstatement.

What for implementation should I do.

Please help,

Henk
[originally posted on jforum.net by henkie]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Rafael Steil wrote:HHmm.. If you make your own implemenation of LoginAuthenticator (default implementation is DefaultLoginAuthenticator.java), then you don't need to do this replication of users by hand. JForum will automatically check if the incoming user exist in its database and, if it does not, insert it.

Rafael



In my case I'll have 3 sets of users (students, teachers & staff) so I'm planning to replicate them in the JForum DB, just to make sure that the groups are in sync and give them the appropriate permissions depending on the group they belong to.

Is there any way to prevent new users to be created in JForum at all, except by directly inserting them in the DB? I just want those controlled users to be able to access the forums. I'd like also to prevent them to change the user settings in their profile (email & password) as that will be determined at the original system.

Are there any properties or settings in JForum to configure it like that?

Cheers"
D.
[originally posted on jforum.net by GreenEyed]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep. Go to Admin Panel -> Configurations, and set "Enable registration of new users" to "false"

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To return to my first question. Where can I find the sql statements. And where can i put mine?

Please help.

Thnx,

Henk
[originally posted on jforum.net by henkie]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are in WEB-INF/config/database/generic and WEB-INF/config/database/<your_db>

Rafael
[originally posted on jforum.net by Rafael Steil]
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic