×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    Berlin, Germany
    Posts
    45

    User Password Settings - Need help ...

    hi,

    i want that the user is able to change a user password/pin.

    So he should be able to enter:
    --------------------------------------
    OLD Password: ****
    New Password: ****
    New Password: ****
    --------------------------------------
    OK|........................|CANCEL |
    --------------------------------------

    Only if old and new one are equal the new password will be stored.

    If found CAknPasswordSettingPage which might do this? But i didnt find any example and doc
    how to use it, nor any info which Ressource i have to provide for this setting page?

    What is the prefered way to implement a password setting view/page for series 60?
    Are there any examples?

    Regards

    Christoph

  2. #2
    Registered User
    Join Date
    Nov 2006
    Posts
    16

    Re: User Password Settings - Need help ...

    Hi ,
    I am also in need of help in series 80 .
    I am trying to create dialog box to change password using resource file for Nokia 9300, I am trying to create two strings one for old password and second for New password , but I am not getting that . I am getting only one string ,so please help me what is the problem in my code which is below.

    RESOURCE DIALOG r_change_password
    {
    title=STRING_CHANGEPASSWORD;
    buttons=R_EIK_BUTTONS_CANCEL_OK;
    flags=EEikDialogFlagWait;

    items=
    {
    DLG_LINE
    {
    type=EEikCtRichTextEditor;
    prompt=STRING_PASSWORD;
    id=EUserName;
    control=RTXTED
    {
    width=60;
    height=5;
    numlines=1;
    textlimit=10;
    };
    },
    DLG_LINE
    {
    type=EEikCtRichTextEditor;
    prompt=STRING_NEW_PASSWORD;
    id=EPhoneNumber;
    control=RTXTED
    {
    width=60;
    height=5;
    numlines=1;
    textlimit=10;
    };
    }
    };
    }

  3. #3
    Regular Contributor
    Join Date
    Apr 2006
    Location
    Malaysia
    Posts
    246

    Wink Re: User Password Settings - Need help ...

    Hi,

    I'm get the password using form:
    Code:
    RESOURCE FORM r_smsexample_changecode_form
            {
            flags = EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat ;
            items =
                    {
                    DLG_LINE
                            {
                            type = EEikCtSecretEd;
                            prompt = OLD_CODE_TEXT;
                            id = ESMSExampleCIdOldCode;
                            control = SECRETED
                                    {
                                    num_letters = KMaxAccessCodeLength;
                                    };
                            },
                    DLG_LINE
                            {
                            type = EEikCtSecretEd;
                            prompt = NEW_CODE_TEXT;
                            id = ESMSExampleCIdNewCode;
                            control = SECRETED
                                    {
                                    num_letters = KMaxAccessCodeLength;
                                    };
                            },
                    DLG_LINE
                            {
                            type = EEikCtSecretEd;
                            prompt = RETYPE_CODE_TEXT;
                            id = ESMSExampleCIdRetypeCode;
                            control = SECRETED
                                    {
                                    num_letters = KMaxAccessCodeLength;
                                    };
                            }
                    };
            }

    Then, I did compared the password.
    Code:
    // To compare new access code and old access code
    void CSMSExampleChangeCode::ComparePassword(const TDesC& aOld, const TDesC& aNewp, const TDesC& aRetype)
    {
      // Check if fields is empty
      if ((aOld.Length() == 0) || (aNewp.Length() == 0) || (aRetype.Length() == 0))
        {
            iView->NotifyMessageFieldEmptyL(KCodeEmpty);
        }
    
      else
        {
            if (aOld.Compare(aNewp) == 0) // Check if old and new access code is same
                {
                    iView->NotifyMessageInvalidL(KCodeError);
                }
    
            else
                {
                    if (aNewp.Compare(aRetype) == 0) // If new access code and retype is the same
                        {
                            // Here is code to save new access code!
    
                            // New code is saved
                            iView->NotifyMessageL(KChangeCode);
                        }
                    else
                        {
                            iView->NotifyMessageInvalidL(KCodeError);
                        }
                }
        }
    }
    Hope it helps... ;)
    Regards,
    Nini

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×