示例#1
0
 /** make the login
  * @param $login
  * @param $password
  * @return int
  */
 public static function make_login($login, $password)
 {
     $_SESSION['login_marmiton'] = $login;
     $model = new Model();
     $rs = $model->make_login_connector($login, $password);
     $a = $rs->fetch();
     if ($a != NULL) {
         $_SESSION['idu'] = $a['id_u'];
         $_SESSION['first_name_marmiton'] = $a["first_name"];
         return $a["first_name"];
     } else {
         return 0;
     }
 }
示例#2
0
 /** make the login
  * @param $login
  * @param $password
  * @return int
  */
 public static function make_login($login, $password)
 {
     $_SESSION['login'] = $login;
     $_SESSION["passwd"] = $password;
     $model = new Model();
     $rs = $model->make_login_connector();
     if ($rs->errorInfo()[2] == NULL) {
         return 1;
     }
 }