Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

UserDAO on SSO is not working...

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi , i ve tried to use UserDAO on SSO but it seems its not working...
Its not applying modifications to db.
Here is the code i tried.

// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: CookieUserSSO.java


[originally posted on jforum.net by kadirbasol]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We need more information. Which modifications aren't being saved? Have you tried to debug? Everything else "works"?

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
inside SSO Code i'm trying to register user , when user is not found.
I've used your DAO to register user myself manually.
I know , SSO is registering user without doing that but , i want to do some modification after he/she registers.
I mean , I want to set their group ( General , GeneralTR ) and set their Language
UserDAO dao = DataAccessDriver.getInstance().newUserDAO();
User user = dao.selectByName(username);
boolean exists = (user != null);
//user null ise , yani user kayitli degil yoksa,
ResultSet rs = null;
if(!exists) {
user = new User();
user.setUsername(username);
user.setPassword(pwd);
user.setEmail(mail);
user.setActive(1);
}
//before he/she registers the site : website in english or turkish ,
//change forum language to native language of the site for user
if(site.equals("Turkish")) {
user.setLang("tr_TR");
} else if(site.equals("English")) {
user.setLang("en_US");
}
int new_id = dao.addNew(user);
//after she/he registers , turkish groups or english groups
if(site.equals("Turkish")) {
dao.addToGroup(new_id, new int[] { 5 } );
} else if(site.equals("English")) {
dao.addToGroup(new_id, new int[] { 3 } );
}

This code should set forum language before user registers then after registration complete , it shoul set user's group.
Well , when i look at the user is being registered but its language and group not set !!!
It seems DAO Functions fails...
I ve debugged its passing thru DAO functions without doing anything.

[originally posted on jforum.net by kadirbasol]
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic