Skip to content

Instantly share code, notes, and snippets.

@AppGiniCourse
Last active May 12, 2016 08:53
Show Gist options
  • Select an option

  • Save AppGiniCourse/37f79eaa7a9230e317f197a695ed0a82 to your computer and use it in GitHub Desktop.

Select an option

Save AppGiniCourse/37f79eaa7a9230e317f197a695ed0a82 to your computer and use it in GitHub Desktop.
Customizing AppGini web application - Section 4 - Lesson 2
<?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;
}
}
@AppGiniCourse
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment