By Greg McGuffey - 3/26/2007
As you might remember (or not... ) I have this whole "project" based app going. I just realized that when I allow the user to change projects, I need to login them in again in order to refresh there permission (that was a fun 3 hrs figuring out what was wrong). I'd prefer to just do this programmatically, logging the same user back on, which means I'd need their user name and password to pass to SetLoggedInUser. How do I retrieve this info? I know the password is encrypted in a field in the user table, but how do I get it?
|
By StrataFrame Team - 3/27/2007
You can use the SFSUsersBO to retrieve the value. The SecurityBasics.CurrentUser.UserPK will give you the primary key for the user and you can create a new SFSUsersBO and FillByPrimaryKey() to get the user record. The password is then accessible through the PasswordPlainText property. Of course, once you have the customer record in the SFSUsersBO, you could then just call LoggedInUser.SetLoggedOnUser() and just pass it the SFSUsersBO with the record... this will cause the permissions to be retrieved and the CurrentUser object (and therefore the permissions) to be refreshed; so you really don't need the password once you have the record.
|
By Greg McGuffey - 3/27/2007
Cool! Thanks!
|
|