Einar,
>We are using MM.Net to port an old program into C#.Net. The old program has users and their passwords stored in its own tables, and the password is stored in encrypted format. The users from the old program's database will be copied into the new program's MM Users tabel. Since the passwords are stored in our own encrypted format I need a way to encrypt new user's
>passwords (for example users that are created with mmUsersForm). Is
>there a hook that I can use so the password can be encrypted with our algorithm before it gets stored in the Users table?
The mmUser business object is used to save user data so you can do the following:
1. Create a subclass of mmUser
2. Override the PreSaveHook() method and put your encryption code here
3. In your application's Factory class, override the CreateUserObject() method so MM .NET instantiates your specialized subclass. For example:
public override mmUser CreateUserObject()
{
return new MyUser();
}
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com