Guest User

Untitled

a guest
Jan 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. function onLoginUser($user, $options)
  2.     {
  3.         // Initialize variables
  4.         $success = false;
  5.         // session_start();
  6.         // Here you would do whatever you need for a login routine with the credentials
  7.         //
  8.         // Remember, this is not the authentication routine as that is done separately.
  9.         // The most common use of this routine would be logging the user into a third party
  10.         // application.
  11.         //
  12.         // In this example the boolean variable $success would be set to true
  13.         // if the login routine succeeds
  14.  
  15.         // ThirdPartyApp::loginUser($user['username'], $user['password']);
  16.        
  17.         session_start();
  18.         $_SESSION['valid_user'] = $user['username'];
  19.         $success = true;
  20.         // print_r($_SESSION);
  21.         return $success;
  22.     }
Add Comment
Please, Sign In to add comment