Topic: password error

I am creating a form for users, but I am facing a problem with the password. Attached is a project for clarification

Post's attachments

Attachment icon password form hellp.rar 293.54 kb, 58 downloads since 2023-07-11 

Re: password error

Hi,
If you use your own form then you cannot use the standard MVD password functionality because you do not know the encryption key that it uses.  This is why your form isn't working - it saves an unencrypted password but when you try to log in, it is trying to compare an unencrypted password with an encrypted version of the password and, of course, they do not match.
Instead, you will need to create your own tables to hold user / password information and encrypt / decrypt passwords with your own encryption key.
Is there any reason why you can't just use the standard forms that MVD already provides with its password function?
Derek.

3 (edited by ms2014m 2023-07-12 05:02:16)

Re: password error

There is nothing wrong with using the mvd, but you can add it inside the form instead of the top bar

Re: password error

I suggest using buttons to replicate the actions of the top (menu) bar instead of writing your own form - it's a lot more straightforward.
In the attachment, user 'admin' see buttons to 'maintain users' and 'change password' but user 'derek' only sees the 'change password' button.
The passwords are the same as the user IDs.
Derek.

Post's attachments

Attachment icon users and passwords.zip 436.71 kb, 66 downloads since 2023-07-12 

Re: password error

derek wrote:

I suggest using buttons to replicate the actions of the top (menu) bar instead of writing your own form - it's a lot more straightforward.
In the attachment, user 'admin' see buttons to 'maintain users' and 'change password' but user 'derek' only sees the 'change password' button.
The passwords are the same as the user IDs.
Derek.



This is an excellent solution, thank you for your help
But I have another request, when trying to make form 1 appear through another form, it gives me an error, how can it be corrected

Post's attachments

Attachment icon users and passwords1.rar 393.55 kb, 58 downloads since 2023-07-12 

Re: password error

The 'menu bar' always appears on the first form in MVD.
So if you change the first form from 'Form1' to 'xxx' then you need to alter the script accordingly (ie replace 'form1.mniusers.click' with 'xxx.mniusers.click' etc etc).
Derek.

Post's attachments

Attachment icon users and passwords1.zip 436.87 kb, 70 downloads since 2023-07-12 

Re: password error

derek wrote:

The 'menu bar' always appears on the first form in MVD.
So if you change the first form from 'Form1' to 'xxx' then you need to alter the script accordingly (ie replace 'form1.mniusers.click' with 'xxx.mniusers.click' etc etc).
Derek.



Work completed successfully

Is it possible to make the primary admin field accept modification, but it does not accept deletion, because when it is deleted with users with specific powers, no users can be added

Re: password error

It's not something you need to check for.
If MVD detects that there is no user with 'administrative privileges' (for example, if such a user has been deleted), then it automatically re-creates one.
You can try it to check it out how it works.
Derek.

Re: password error

derek wrote:

It's not something you need to check for.
If MVD detects that there is no user with 'administrative privileges' (for example, if such a user has been deleted), then it automatically re-creates one.
You can try it to check it out how it works.
Derek.


You are on the right, the program puts the default settings admin / admin