Last active
May 12, 2016 08:53
-
-
Save AppGiniCourse/37f79eaa7a9230e317f197a695ed0a82 to your computer and use it in GitHub Desktop.
Customizing AppGini web application - Section 4 - Lesson 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // For help on using hooks, please refer to http://bigprof.com/appgini/help/working-with-generated-web-database-application/hooks | |
| function login_ok($memberInfo, &$args){ | |
| return ''; | |
| } | |
| function login_failed($attempt, &$args){ | |
| $ip = $_SERVER['REMOTE_ADDR']; | |
| $ts = time(); | |
| $details = makeSafe("User login failed. Username: {$attempt['username']}. Password: {$attempt['password']}"); | |
| sql("insert into logs set ip='{$ip}', ts='{$ts}', details='{$details}'", $eo); | |
| } | |
| function member_activity($memberInfo, $activity, &$args){ | |
| switch($activity){ | |
| case 'pending': | |
| break; | |
| case 'automatic': | |
| break; | |
| case 'profile': | |
| break; | |
| case 'password': | |
| break; | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The source code above is part of our online course on customizing AppGini web applications. The course takes you step-by-step into expanding your applications to fit your business needs. No programming experience is assumed ... we'll explain each line in an easy to follow pace. Learn more and get 10% off the course here: https://www.udemy.com/customizing-appgini-web-applications/?couponCode=TENOFF