changeable passwords

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

ouagadeal
Posts: 7
Joined: Wed Dec 05, 2012 5:58 pm

Re: changeable passwords

Post by ouagadeal » Mon Dec 17, 2012 10:01 pm

Sorry for the confusion. What I was trying to say , is if I want to change the password specially for the student in the App, is there a way for me to change it? because I wanted to be able to generate a temporary password and allowed them to change it , in addition to that As a super admin I want to be able to go in an change the password from the Admin card.
Again sorry!!!!!!!

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: changeable passwords

Post by Mark » Tue Dec 18, 2012 12:58 am

Hi,

Do I understand correctly that you want each student (and the admins) to be able to change his or her password into a custom password? In any case, you'll have to save the passwords in a file on disk and not in the standalone application. It also means that students need a user name. I could imagine that there is a field with a list of students in the admin's screen and a if he clicks on a student's name, he could enter a password in a field, which would be saved to a file. You could make just one tab-delimited file with names in the first column and passwords in the second column. When the app opens, this list is read into memory and the first column is displayed in the field on the admin's screen. I don't think that the admin should be able to see a password, but he should be able to reset it. The Reset button might look like this:

Code: Select all

global gStudentList
on resetPassword
  put the selectedText of fld "Student List" into myStudentName
  put fld "New Password" into myNewPassword
  put lineoffset(myStudentName & tab,gStudentList) into myLineNr
  put myStudentName & tab & myNewPassword into line myLineNr of gStudentList
  put specialfolderpath("preferences") & "/students_pw_1001.prefs" into myPath
  put gStudentList into URL ("binfile:" & myPath)
end resetPassword
The student screen would have a similar script, but instead of a list of students, he would only see his own name, which he needs to enter in a field on the first card. This means that you might want to replace the ask dialog window with a password field like the one in this list (but there are more password fields available, just search this forum). The student can only go to the next screen if the password is correct and there he will find a button with a script similar to the script above, but the first line would be something like

Code: Select all

put fld "Individual Student" into myStudentName
This is not a complete solution. It is just an example of how you could update the list. You will also need a script that puts the file with the student list into variable gStudentList. Just start scripting and ask more questions along the way.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

ouagadeal
Posts: 7
Joined: Wed Dec 05, 2012 5:58 pm

Re: changeable passwords

Post by ouagadeal » Tue Dec 18, 2012 2:29 pm

I love this forum so far. You "rock" Marck. I am trying to reproduce my authorware application and so war , I am happy to be with LiveCode.

ouagadeal
Posts: 7
Joined: Wed Dec 05, 2012 5:58 pm

Re: changeable passwords

Post by ouagadeal » Wed Dec 19, 2012 6:26 am

Sorry, it looks like I missed some steps.
I worked on my app tonight but I was not able to implement what I have been told.
The first step with 3 different passwords for some reasons , I always get " the Password id wrong " message popping up. I just copied the code and paste it. I don't know if I need to define the three passwords or no before using the code but it didn't work .
I skipped and moved to the step 2 where wanted to implement the change of password, here I got an error on "reset password" line.

I am new to this maybe I missed some parts in the implementation process .
I also made a donation on website link that you sent me , I got the password stack but I didn't know how to use it.
Thank you for your help MArck, but I think, I messed it up

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: changeable passwords

Post by Mark » Wed Dec 19, 2012 4:25 pm

Hi,

I wrote: "This is not a complete solution. It is just an example of how you could update the list." I mean this very seriously. There is too much to this app to provide you with complete instructions. I'd start with just 2 cards and two fields and one button on the first card. Perhaps even forget about encryption and just check that the user has entered a correct name and password. Add the encryption as a second step and let me know if it works for you.

Kind regards,

Mark
Last edited by Mark on Wed Dec 19, 2012 4:47 pm, edited 1 time in total.
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: changeable passwords

Post by Klaus » Wed Dec 19, 2012 4:29 pm

Hi ouagadeal,
ouagadeal wrote:...MArck...
maybe you should also copy/paste the correct names! 8)


Best

Klaus

ouagadeal
Posts: 7
Joined: Wed Dec 05, 2012 5:58 pm

Re: changeable passwords

Post by ouagadeal » Wed Dec 19, 2012 5:37 pm

thank you Mark for the update. Can you tell me what exactly you want me to add to the code? I really appreciate your help.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: changeable passwords

Post by Mark » Wed Dec 19, 2012 8:43 pm

Hi ouagadeal,

I'd really like you to come up with a first attempt. Make that card with two fields and one button and try something. Tell me how far you got and I'll help you with the next step.

Did you read in the documentation about the mouseUp message, the put command and the if-then-else structure?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

ouagadeal
Posts: 7
Joined: Wed Dec 05, 2012 5:58 pm

Re: changeable passwords

Post by ouagadeal » Wed Dec 19, 2012 10:28 pm

Will do tonight and get back to you!
thanks

Post Reply