PHP User::readDatabase Examples

PHP User::readDatabase - 2 examples found. These are the top rated real world PHP examples of User::readDatabase extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
<?php

//Session_Handler::destroySession();
Session_Handler::checkSession();
$user = new User();
//$user->setUserName("d");
//$user->setPassword("asdf");
$d = $user->readAllDatabase();
$result = $user->readDatabase('where username=? and password=?', array('asdf', 'asdf'));
print_r($result);
echo key($_GET);
echo $user->isExist();
print_r($user);
echo $user::isLogin();
print_r($user);
/*
  if ($user->isExist()) {
    echo "login";
  } else {
    echo "no user!";
  } */
Example #2
0
 public static function Page($array)
 {
     $log_user = Tool::getLoginUser();
     if ($array[0] == CREATE) {
         header("Location:../?menu=" . PAGE_MANAGE_USER . "&" . VIEW . "=" . CREATE);
     } elseif ($array[0] == EDIT) {
         $user = new User();
         $user->setId($_GET['id']);
         $user->readDatabase();
         SessionHandlers::saveSession($user, 'edit_user');
         header("Location:../?menu=" . PAGE_MANAGE_USER . "&" . VIEW . "=" . EDIT);
     } elseif ($array[0] == SHOWHIDE) {
         header("Location:../?menu=" . PAGE_MANAGE_USER . "&cache=" . $_GET['cache']);
     } elseif ($array[0] == REFRESH) {
         header("Location:../?menu=" . PAGE_MANAGE_USER);
     } else {
         echo "page not found";
     }
     exit;
 }