jedgett wroteI see in 4.3.4 there is a "force password change" link in the user edit screen. That must be saved in the database somewhere.
I am not sure about forcing them to update their profile.
Exellent, I hadn't noticed that option. All you have to do to foce a password update is set the Membership.UpdatePassword flag to true. I won't worry about forcing an email update for now. Hopefully the core team will add an UpdateProfile flag soon.
Here is the code I use to add a user if anyone is interested:
void AddUser(string firstname, string lastname, string username, string password)
{
UserCreateStatus userCreateStatus = UserCreateStatus.AddUser;
UserInfo objNewUser = new UserInfo();
objNewUser.PortalID = PortalId;
objNewUser.Email = "";
objNewUser.IsSuperUser = false;
objNewUser.FirstName = userInfo.FirstName;
objNewUser.LastName = userInfo.LastName;
objNewUser.Username = userInfo.UserName;
userInfo.Password = MyPasswordGeneratingMethod();
objNewUser.Membership.Password = userInfo.Password;
objNewUser.Membership.Approved = true;
// force the user to change their password on first login
objNewUser.Membership.UpdatePassword = true;
userCreateStatus = UserController.CreateUser(ref objNewUser);
if (userCreateStatus == UserCreateStatus.Success)
{
UserInfo objUserInfo = UserController.GetUserByName(PortalId, userInfo.UserName, false);
objUserInfo.Profile.SetProfileProperty("FirstName", userInfo.FirstName);
objUserInfo.Profile.SetProfileProperty("LastName", userInfo.LastName);
... set other custom profile properties
}