Jon Stevens wrote:
> on 11/27/2000 2:08 PM, "Julien Giovannnoni" <[EMAIL PROTECTED]>
> wrote:
> 
> > Criteria c =  new Criteria();
> > c.add(TurbineUserPeer.USERID, visitor_id);
> > Vector v = TurbineUserPeer.doSelect(c);
> > TurbineUser u= (TurbineUser) v.elementAt(0);
> > String password = u.getPassword();
> 
> that should pretty much do it.
> 
> what error are you getting?
> 
> you should have more error checking code to make sure that you are getting a
> result back from the Vector...ie if (v.size() > 0)

No no no no :) You don't do it this way in the new security framework.

If your system stores passwords in encrypted form, this is obviously not
possible.
It wouldn't be possible if you used an UserManager that used an IMAP
server or
NT domain controler to validate passwords (because it wouldn't store the
passwords
at all).

Otherwise, you do this like that:

User user = TurbineSecurity.getUser(loginName);
String password = user.getPassword();

Rafal

--
Rafal Krzewski
Senior Internet Developer
mailto:[EMAIL PROTECTED]
+48 22 8534830 http://e-point.pl


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to