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

Which users have logged in recently?

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

    Which users have logged in recently?

    Happy Holidays to everyone in the Alpha community. I wish you all the best for the year ahead.

    I received a call from a customer tonight telling me that one of her employees left the company on bad terms and may have used his user name and password to log onto their application to retrieve proprietary information. Of course, I immediately deleted that user's account and login credentials, but she wanted to know if he actually logged in during the past few days, while the office was closed.

    So, that's my question to you: Is there a "log" file that tells which users have logged in/out recently, with the times of login and logout? I saw the "Access Log" on the server, but it doesn't appear to show user names or log in/log out information. I can probably create a script that will do this in the future, but I was hoping there was something built into the application server could would give this information.

    I'd appreciate any help or suggestions about how I can get this information.

    Thanks,
    Phil

    #2
    Re: Which users have logged in recently?

    This reinforces the need for Human Resources, or management to carry out proper exit control.
    The government departments I have worked in had varying degrees of people exit strategies, but the overriding one was immediate accout deactivation on the day if leaving - for whatever reason.
    I'm afraid I don't have a definitive answer, but I imagine that there is something similar on the Web side like the Audit Trail in Desktop, but that has to be turned on.
    See our Hybrid Option here;
    https://hybridapps.example-software.com/


    Apologies to anyone I haven't managed to upset yet.
    You are held in a queue and I will get to you soon.

    Comment


      #3
      Re: Which users have logged in recently?

      i simply have another editable grid based on the web_user table., seen by the administrator only where you remove the non employee when they leave. (or change their status to something else which prohibits access if you like that idea).
      thanks for reading

      gandhi

      version 11 3381 - 4096
      mysql backend
      http://www.alphawebprogramming.blogspot.com
      [email protected]
      Skype:[email protected]
      1 914 924 5171

      Comment


        #4
        Re: Which users have logged in recently?

        We keep a "login history" table that we created. We have a page called "startup" where everyone is sent when they log in, and that's where we assign session variables and redirect to the right place. So, we just added an insert to the table there. I often go there to check which clients logged in this morning, and to check if employees are logging in to multiple sessions (they are).
        Pat Bremkamp
        MindKicks Consulting

        Comment


          #5
          Re: Which users have logged in recently?

          Using Pats method, It's possible to trap people who are already logged in and stop multiple sessions if you catch the login/logout information. You also need to catch the X box Windows application close if it's allowed.
          The Web apps I build have a User table which is used to create an IMDB as people join or leave. Attaching an activity log to capture specific operations - CRUD for the user is possible.
          Only Admin people have access to creating/deleting/restricting users.
          See our Hybrid Option here;
          https://hybridapps.example-software.com/


          Apologies to anyone I haven't managed to upset yet.
          You are held in a queue and I will get to you soon.

          Comment


            #6
            Re: Which users have logged in recently?

            Alpha has a "built-in" login function that can track logins & logouts. You have to enable it. You will also need to build your own table which the login function will point to. Easy to do, really. I use it on all my sites.

            Login Activity.png

            The function looks like this:

            Code:
            function saveLoginLog as v (e as p)
            '-- Values Available - Data type - Description
            'e.session - Pointer - session variables. TIP: To set a session variable: e.Session.myNewSessionVariable = "Alpha"
            'e.userid - Character - userid of the logged in user
            'e.ulink - Character - 'ulink' value saved for the logged in user (not available in IIS)
            'e.passexp - Time - a time value indicating when the user's password will expire (not available in IIS)
            'e.loginexp - Time - a time value indicating when the login will expire (not available in IIS)
            'e.loginerror - Character - any error message returned if a login activity failed
            'e.loginaction - Character - The login activity action, such as Login Succeeded, Login Failed
            'e.IP - Character - IP address of the remote client making the request
            'e.logout - Logical - Default is .F., will be .T. if the action is a 'log out'
            ''===============================================================================
            Dim conn as SQL::connection
            Dim args as SQL::Arguments
            Dim SQL as c
            
            vHost = request.host
            vNow = now()
            
            If e.logout = .T.
            	vType = "LogOut"
            	vExpires = vNow 
            Else
            	vType = "LogIn"
            	vExpires = vNow + (session.timeout*60)
            End If
            
            args.add("LoginName",e.userid)
            args.add("DateTime",vNow)
            args.add("Type",vType)
            args.add("IP",e.IP)
            args.add("LogExpires",vExpires)
            args.add("PwdExpires",e.passexp)
            args.add("LogError",e.loginerror)
            args.add("Host",vHost)
            
            SQL = "INSERT INTO Sys_Login_Activity (LogLoginName, LogDateTime, LogType, LogIP, LogExpires, LogPwdExpires, LogError, LogHost) VALUES (:LoginName, :DateTime, :Type, :IP, :LogExpires, :PwdExpires, :LogError, :Host)"
            
            conn.open("::Name::XXXXXXXXXX")							
            conn.execute(SQL, args)
            conn.close()
            
            end function
            Peter
            AlphaBase Solutions, LLC

            [email protected]
            https://www.alphabasesolutions.com


            Comment


              #7
              Re: Which users have logged in recently?

              Wow! You are terrific. Thank you for taking your valuable time to respond. I really appreciate it.

              In this case, it's NOT really a Human Resources situation. It appears that the employee was trying to start a competing company while he was still working there (they immediately fired him and removed his login when they discovered this). Because the last 2 weeks have had only limited activity, the company's owner was curious about whether the employee was logging in to steal information (e.g. Customer Lists, etc.), prior to letting them know he was leaving. That's what I was trying to learn!

              I love Peter's response... I didn't notice that functionality built into Alpha (I just activated and tested it), but it's exactly what I would have needed. Oh well! Going forward, I intend to use it in all future applications... AND probably plan to retrofit my existing apps.

              Thanks again for all your help. Best wishes for a happy, healthy and successful New Year.

              Comment


                #8
                Re: Which users have logged in recently?

                Originally posted by Peter.Greulich View Post
                Alpha has a "built-in" login function that can track logins & logouts. You have to enable it. You will also need to build your own table which the login function will point to. Easy to do, really. I use it on all my sites.

                [ATTACH=CONFIG]42911[/ATTACH]

                The function looks like this:

                Code:
                function saveLoginLog as v (e as p)
                '-- Values Available - Data type - Description
                'e.session - Pointer - session variables. TIP: To set a session variable: e.Session.myNewSessionVariable = "Alpha"
                'e.userid - Character - userid of the logged in user
                'e.ulink - Character - 'ulink' value saved for the logged in user (not available in IIS)
                'e.passexp - Time - a time value indicating when the user's password will expire (not available in IIS)
                'e.loginexp - Time - a time value indicating when the login will expire (not available in IIS)
                'e.loginerror - Character - any error message returned if a login activity failed
                'e.loginaction - Character - The login activity action, such as Login Succeeded, Login Failed
                'e.IP - Character - IP address of the remote client making the request
                'e.logout - Logical - Default is .F., will be .T. if the action is a 'log out'
                ''===============================================================================
                Dim conn as SQL::connection
                Dim args as SQL::Arguments
                Dim SQL as c
                
                vHost = request.host
                vNow = now()
                
                If e.logout = .T.
                	vType = "LogOut"
                	vExpires = vNow 
                Else
                	vType = "LogIn"
                	vExpires = vNow + (session.timeout*60)
                End If
                
                args.add("LoginName",e.userid)
                args.add("DateTime",vNow)
                args.add("Type",vType)
                args.add("IP",e.IP)
                args.add("LogExpires",vExpires)
                args.add("PwdExpires",e.passexp)
                args.add("LogError",e.loginerror)
                args.add("Host",vHost)
                
                SQL = "INSERT INTO Sys_Login_Activity (LogLoginName, LogDateTime, LogType, LogIP, LogExpires, LogPwdExpires, LogError, LogHost) VALUES (:LoginName, :DateTime, :Type, :IP, :LogExpires, :PwdExpires, :LogError, :Host)"
                
                conn.open("::Name::XXXXXXXXXX")							
                conn.execute(SQL, args)
                conn.close()
                
                end function
                I'd like to try this. Where is the property to turn on the feature? I can't seem to find it. Thanks.
                Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                Comment


                  #9
                  Re: Which users have logged in recently?

                  See image...

                  Login Function.png
                  Peter
                  AlphaBase Solutions, LLC

                  [email protected]
                  https://www.alphabasesolutions.com


                  Comment


                    #10
                    Re: Which users have logged in recently?

                    Thanks Peter
                    Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                    Comment


                      #11
                      Re: Which users have logged in recently?

                      I'm displaying this in a UX list component but there seems to be something 'funny' with the way e.loginerror renders the row.
                      For all the other e object data values, the row displays correctly on a single line. But e.loginerror causes the row to render approx 3x the normal height which makes for an odd looking list.
                      The screenshot shows this:

                      LoginError.png

                      I've played around with many of the data in-line style properties such as whitespace, width, font, etc. to no avail. I thought about a ltrim or alltrim but I don't know how you would apply it to e.loginerror.

                      Does this sound like it could be a bug?
                      Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                      Comment


                        #12
                        Re: Which users have logged in recently?

                        I doubt it. When I have log errors that doesn't happen.
                        Peter
                        AlphaBase Solutions, LLC

                        [email protected]
                        https://www.alphabasesolutions.com


                        Comment


                          #13
                          Re: Which users have logged in recently?

                          You're using a grid not a UX list aren't you?

                          It's very strange that it is only e.loginerror that does this
                          Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                          Comment


                            #14
                            Re: Which users have logged in recently?

                            Oh I see. Yes, a grid.
                            Peter
                            AlphaBase Solutions, LLC

                            [email protected]
                            https://www.alphabasesolutions.com


                            Comment


                              #15
                              Re: Which users have logged in recently?

                              After following Peter's instructions, I added this to my applications, using a grid, also and I am not getting any errors. FYI, I know Grids are a "out of favor", but for this function, setting it up was fast and easy and worked (with the search functions I wanted) perfectly.

                              Thanks Peter

                              Comment

                              Working...
                              X