Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Web Security Functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Web Security Functions

    Hi,

    I know these are not in the official Help File, but does anyone have a list of avaliable functions or a link to help files concerning the Web Security?

    I'm trying to find a function to change a users password. Spent an hour trying A5_CHANGE_USER_PASSWORD() And yes I now know thats for desktop systems... :o

    Another question: Whats the maximum field length's for web security fields. I've counted the External User ID from the web security->edit user at 40 chars , can this be changed?

    John

    #2
    Re: Web Security Functions

    All of the security functions are in the standard help file (except one, a5ws_login_user()). They all begin with "a5ws_". There is a very good tutorial on how to change user values, read up on the function a5ws_save_user_values() and related tutorials. If you type "a5ws_" in to an interactive window, you will also see contextual help.

    Your External User ID should not be over 40 in length; what special circumstance do you have where you want it to be longer?
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Re: Web Security Functions

      Hi Steve,

      i'll check out those details, although I could find no instances of these on the online help files.

      In this case, I'm using an email address as External User ID, which in one instance is longer than 40chars.

      Thanks for the help

      john

      Comment


        #4
        Re: Web Security Functions

        (Advice) Don't use the email address or any other significant value as the External ID. Use a simple sequential number at least. If you make it the email address, you will constantly have to manage it if their email changes. The purpose of the External ID is to have some abstract value to link your user records to the security record.

        I know that there is nothing in the Help on how to automatically create a sequential value for your External ID, but you can search this forum for some examples.

        Proper use of the External ID also provides an always-available session variable that identifies your logged in user. So if Jim is logged in and their External ID is 1000, that "1000" will be always be sitting in a session variable. You can structure your application such that when Jim saves a record, that 1000 is saved along with the record. Now when Jim logs back in, that 1000 will automatically be placed in a session variable and you can use it as a filter to ensure that Jim only sees information that he originally saved. (Whew, long sentence.. etc, lots of other scenarios exist).
        Steve Wood
        See my profile on IADN

        Comment


          #5
          Re: Web Security Functions

          Hi Steve,

          Yes I'm doing exactly as you described, but only using an email.

          And yes, I'm finding out the hard way, when the client (and they always do) wants to change their email, it screws up my session variable which I'm using to find records linked to that user. :)

          john

          Comment


            #6
            Re: Web Security Functions

            Hi John,
            I use the online help --used the index search and typed in security and found:
            http://support.alphasoftware.com/alp...y_Settings.htm

            Type in a5ws and many functions for the web come up including:

            http://support.alphasoftware.com/alp...r_Values().htm

            One of the hardest things in learning Alpha I find is being able to find what you want in the help or messageboard files/posts....once that is figured out it really expedites the learning process quite a bit.
            Mike
            __________________________________________
            It is only when we forget all our learning that we begin to know.
            It's not what you look at that matters, it's what you see.
            Henry David Thoreau
            __________________________________________



            Comment


              #7
              Re: Web Security Functions

              Thanks all for the advice and help :)

              John

              Comment


                #8
                Re: Web Security Functions

                Might be close but not saving changes to security so far.

                Validate
                dim request.variables.guid as c
                dim request.variables.email as c
                request.variables.guid = alltrim(lookupc("F",alltrim(session.__protected__userid),"alltrim(Guid)","[pathalias.adb_path]\users","userid"))
                request.variables.email = CurrentForm.Controls.Email.value
                'request.variables.email = "[email protected]"

                dim output as p
                dim output.controls as p
                dim output.controls.guid.value as c
                dim output.controls.email.value as c

                dim result as p
                dim error_message as c
                dim group_list as c
                result = a5ws_Save_User_Values(output,request)
                if result.errors = .T. then
                error_message = result.error_text
                end
                end if
                user_guid = output.controls.guid.value

                I have Guid, Userid and Email as controls. I initialize all of them. And can see the correct values in the a5w page.

                Any input? Thanks
                Last edited by EricN; 04-17-2008, 08:18 PM.
                Eric

                Alpha Five Websites
                longlivepuppies.com
                socialservicenetwork.com
                -------------------------------------------------
                socialservicenetwork.org

                Comment


                  #9
                  Re: Web Security Functions

                  You can not specify your own security guid for the web security. The security system will create and supply it own, with is actually a modified guid. You can specify all other user parameters, such as userid, ulink, password, etc.

                  Comment


                    #10
                    Re: Web Security Functions

                    Ok, I now have this:

                    If eval_valid("session.__protected__userid")
                    dim request.variables.guid as c
                    dim request.variables.email as c
                    request.variables.guid = "Guid" <-- Is this what you mean?
                    request.variables.email = CurrentForm.Controls.Email.value <-- also tried without "value"

                    dim output as p
                    dim output.controls as p
                    dim output.controls.guid.value as c
                    dim output.controls.email.value as c

                    dim result as p
                    dim error_message as c
                    dim group_list as c
                    result = a5ws_Save_User_Values(output,request)
                    if result.errors = .T. then
                    error_message = "Bad request"
                    end
                    end if
                    user_guid = output.controls.guid.value
                    a5ws_save_user_values(output,request)
                    end if

                    This is still not working...not saving to security
                    Eric

                    Alpha Five Websites
                    longlivepuppies.com
                    socialservicenetwork.com
                    -------------------------------------------------
                    socialservicenetwork.org

                    Comment


                      #11
                      Re: Web Security Functions

                      As in: request.variables.guid = ""

                      But you are mixing methods here. The code you are using is designed for adding users to security outside of a dialog component, like an A5W page. That's what all the dim output.controls stuff is about.

                      But you are doing this inside of a dialog component. There is a very clear example in the help on adding users using a Dialog. You will end up with only one or two lines of code per event.
                      Steve Wood
                      See my profile on IADN

                      Comment


                        #12
                        Re: Web Security Functions

                        Well I'm just not getting it with this one... toiled for hours now. I bet the answer is simple and right in front of me but just can't spot it.

                        I copied my working NewUser dialog I created months ago and made modifications.

                        Initialize: a5ws_get_user_values(CurrentForm,request)

                        Validate
                        This is all I have for Validate...

                        ' a5ws_save_user_values(CurrentForm,request)
                        dim request.variables.guid as c
                        dim request.variables.email as c

                        request.variables.guid = ""
                        request.variables.email = ""
                        a5ws_save_user_values(CurrentForm,request)

                        Aftervalidate: a5ws_get_user_values(CurrentForm,request)

                        Interactive Window
                        ?a5ws_User_File_Field_List()
                        = Email
                        Guid
                        Password
                        SecAns
                        SecQues
                        Ulink
                        Userid
                        Eric

                        Alpha Five Websites
                        longlivepuppies.com
                        socialservicenetwork.com
                        -------------------------------------------------
                        socialservicenetwork.org

                        Comment


                          #13
                          Re: Web Security Functions

                          Well this one simply stumped me. Maybe someone else will be kind enough to post the solution...

                          I read the help page (link above) so many times I'm seeing double. :(
                          Eric

                          Alpha Five Websites
                          longlivepuppies.com
                          socialservicenetwork.com
                          -------------------------------------------------
                          socialservicenetwork.org

                          Comment


                            #14
                            Re: Web Security Functions

                            Before I show an example, how do you know its not working. If you are publishing to your localhost, and then adding users, you need to run Web Security > Utilities > Retrieve Files (from localhost or your server). Otherwise you will not see added users in the Users and Groups list.
                            Steve Wood
                            See my profile on IADN

                            Comment


                              #15
                              Re: Web Security Functions

                              Hello Steve,

                              After each test through the dialog component, I have been going into Web Security ->Users and Groups -> Import/Export Users -> Import User Information From Server -> after clicking OK then click "Retrieve Files" Then find user I'm testing -> Edit User and here I am able to see if the User's email has been changed. It has not changed.

                              After clicking Submit, the changes seems to be saved on screen but not in security table.
                              Eric

                              Alpha Five Websites
                              longlivepuppies.com
                              socialservicenetwork.com
                              -------------------------------------------------
                              socialservicenetwork.org

                              Comment

                              Working...
                              X