/**
  * 登陆
  */
 public function login()
 {
     $userInput = trim(I('post.username'));
     $pwdInput = trim(I('post.password'));
     $jsonObj = null;
     if ($userInput == '' || $userInput == null) {
         $resultstring = $this->_savelog(-1, -1);
         $jsonObj = $this->jsonResult(0, $resultstring);
         $this->json2Response($jsonObj);
         return;
     } else {
         if ($pwdInput == '' || $pwdInput == null) {
             $resultstring = $this->_savelog(-1, -2);
             $jsonObj = $this->jsonResult(0, $resultstring);
             $this->json2Response($jsonObj);
             return;
         }
     }
     //验证图片
     //$this->vertifyHandle();
     $map = array();
     $map['username'] = $userInput;
     $map['password'] = encrypt($pwdInput);
     $UserEvent = new UserEvent();
     $loginRes = $UserEvent->auth($map);
     $this->json2Response($loginRes);
 }
Пример #2
0
 private function pageinfo()
 {
     $this->checkLogin();
     $this->result["sites"]["customer"] = "selected";
     $this->result["sites"]["title"] = "快递";
     $this->result["sites"]["url"] = encrypt("express");
 }
Пример #3
0
 private function pageinfo()
 {
     $this->checkLogin();
     $this->result["sites"]["sales"] = "selected";
     $this->result["sites"]["title"] = "团购活动";
     $this->result["sites"]["url"] = encrypt("keyword");
 }
Пример #4
0
 /**
  * Generates oauth_token
  * @return string
  * @throws Exception
  */
 public function generateNewToken()
 {
     if (!$this->person_id) {
         throw new \Exception('Unknown user.');
     }
     return encrypt($this->person_id . $this->ct_api_app_id . time());
 }
Пример #5
0
 private function pageinfo()
 {
     $this->checkLogin();
     $this->result["sites"]["sales"] = "selected";
     $this->result["sites"]["title"] = "免费试用";
     $this->result["sites"]["url"] = encrypt("freetrial");
 }
}
/*
Creates a new user with a provided password.
*/
function newUser($stuid, $name, $password, $email)
{
    $stuid = makeStringSafe($stuid);
Пример #7
0
 private function pageinfo()
 {
     $this->checkLogin();
     $this->result["sites"]["sales"] = "selected";
     $this->result["sites"]["title"] = "积分换购";
     $this->result["sites"]["url"] = encrypt("points");
 }
Пример #8
0
 function encryptQRInfo($data)
 {
     $CI =& get_instance();
     $key = $CI->config->item("encryption_key");
     $encrypted = encrypt($data, $key);
     return $encrypted;
 }
Пример #9
0
 private function _globals()
 {
     $this->loadModel(array("User", "Basic"));
     $this->result["sites"]["system"] = "selected";
     $this->result["sites"]["title"] = "我的设置";
     $this->result["sites"]["url"] = encrypt("my");
 }
Пример #10
0
function get_contact_func($xmlrpc_params)
{
    global $db, $lang, $theme, $plugins, $mybb, $session, $settings, $cache, $time, $mybbgroups, $parser, $displaygroupfields;
    $lang->load("member");
    $input = Tapatalk_Input::filterXmlInput(array('user_id' => Tapatalk_Input::STRING), $xmlrpc_params);
    if (isset($input['user_id']) && !empty($input['user_id'])) {
        $uid = $input['user_id'];
    } else {
        $uid = $mybb->user['uid'];
    }
    if ($mybb->user['uid'] != $uid) {
        $member = get_user($uid);
    } else {
        $member = $mybb->user;
    }
    if (!$member['uid']) {
        error($lang->error_nomember);
    }
    // Guests or those without permission can't email other users
    if ($mybb->usergroup['cansendemail'] == 0 || !$mybb->user['uid']) {
        error_no_permission();
    }
    if ($member['hideemail'] != 0) {
        error($lang->error_hideemail);
    }
    $user_info = array('result' => new xmlrpcval(true, 'boolean'), 'user_id' => new xmlrpcval($member['uid']), 'display_name' => new xmlrpcval(basic_clean($member['username']), 'base64'), 'enc_email' => new xmlrpcval(base64_encode(encrypt($member['email'], loadAPIKey()))));
    $xmlrpc_user_info = new xmlrpcval($user_info, 'struct');
    return new xmlrpcresp($xmlrpc_user_info);
}
Пример #11
0
function oneportalcloud_ChangePassword($params)
{
    if (!isset($_POST['ac'])) {
        return 'success';
    }
    $op = new OnePortalCloud($params['configoption1'], $params['configoption2'], $params['configoption3']);
    $server_id = $params['customfields']['Server ID'];
    if (empty($server_id)) {
        return 'Unable to determine Server ID to suspend';
    }
    if (substr(strtoupper($server_id), 0, 3) != 'LSN') {
        $server_id = 'LSN-' . $server_id;
    }
    $ret = $op->changePassword($server_id, $_POST['ac']);
    if (!$ret->error) {
        include '../../../configuration.php';
        # Path to WHMCS configuration file. If change password does not work then make sure this is correct
        $where = array('id' => $params['serviceid']);
        update_query('tblhosting', array('password' => encrypt($_POST['ac'], $cc_encryption_hash)), $where);
        $res = 'success';
    } else {
        $res = $ret->error;
    }
    return $res;
}
Пример #12
0
/** 
* Descripción:	Crea las opciones del MENU principal del sistema
* @author:		Oscar Maldonado - O3M
* Creación: 	2013-02-16
* Modificación:	2015-10-14;
**/
function buildMenuLateral($id_menu)
{
    global $cfg, $Path, $usuario, $dic;
    #Extraccion de datos de la DB-tabla de menú
    $menuData = array(id_menu => $id_menu, id_grupo => false, nivel => false);
    $menus = select_menus_lateral($menuData);
    if ($menus) {
        $menus = !is_array($menus[0]) ? array($menus) : $menus;
        #Construcción de menu
        foreach ($menus as $menu_element) {
            #Link
            $e = explode('/', $menu_element[link]);
            $enlace = $cfg[encrypt_onoff] ? encrypt(strtoupper($e[0]), 1) . '/' . encrypt(strtoupper($e[1]), 1) : strtolower($menu_element[link]);
            $link = $Path['url'] . $enlace;
            #Texto
            $texto = $dic[menulateral][$menu_element[texto]];
            #Imagen
            $imagen = !empty($menu_element[ico]) ? '<img src="' . $Path[img] . $menu_element[ico] . '" alt="' . utf8_encode($menu_element[texto]) . '" class="icono_dos"/>' : '';
            #onClick
            $onclick = !empty($menu_element[link]) ? 'onclick="location.href=\'' . $link . '\';"' : '';
            #Elemento final
            $html = $margen . $imagen . $texto;
            $menu_array[] = array(id_menu => $menu_element[id_menu], id_grupo => $menu_element[id_grupo], menu => $menu_element[menu], texto => $menu_element[texto], nivel => $menu_element[nivel], html => $html, onclick => $onclick);
        }
        $menu_html = build_ul_menu($menu_array);
        return $menu_html;
    } else {
        return false;
    }
}
Пример #13
0
 public static function attempt($credentials)
 {
     $user = User::query();
     foreach ($credentials as $field => $value) {
         if ($field != 'password') {
             $user->where($field, $value);
         }
     }
     $user = $user->first();
     // Bad Email
     if (!$user) {
         $_SESSION['ALERT'] = alert('Oh Snap!', 'No accounts found with that email address...', 'error');
         return false;
     }
     // Bad Password
     if ($user->password != encrypt($credentials['password'])) {
         $_SESSION['ALERT'] = alert('Oh Snap!', 'That doesn\'t look like the right password...', 'error');
         return false;
     }
     // Not Verified
     if (!$user->verified) {
         // Send Verification Email (Always)
         static::sendVerifyToken($user->email);
         $_SESSION['ALERT'] = alert("Housekeeping!", "We're trying to make sure we have a way to contact all of our players. You should have received an email at {$user->email} with a link to confirm you account. If you did not receive this email, please contact us at&nbsp;<a href='mailto:" . $_ENV['SUPPORT_EMAIL'] . "'>" . $_ENV['SUPPORT_EMAIL'] . "</a>.", "info");
         return false;
     }
     // All Set!
     $_SESSION['user'] = $user;
     return true;
 }
Пример #14
0
 public function testEncryption()
 {
     $plain_text = "yay!";
     $cipher_text = "q/xJqqN6qbiZMXYmiQC1Fw==";
     $this->assertEquals(decrypt($cipher_text, self::$configs['cipher']['cipher_key']), $plain_text);
     $this->assertEquals(encrypt($plain_text, self::$configs['cipher']['cipher_key']), $cipher_text);
 }
    function content_56b8d838c04995_38877246($_smarty_tpl)
    {
        ?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title></title>
  <link rel="stylesheet" href="">
</head>
<body>
  <td><a href="insert">Insertar</a></td>
  <table>
    <tr>
      <th>Name</th>
      <th>Document</th>
      <th>Email</th>
      <th></th>
      <th></th>
    </tr> 
    <?php 
        $_smarty_tpl->tpl_vars['person'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['person']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['persons']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['person']->key => $_smarty_tpl->tpl_vars['person']->value) {
            $_smarty_tpl->tpl_vars['person']->_loop = true;
            ?>
      <tr>
        <td><?php 
            echo $_smarty_tpl->tpl_vars['person']->value['name'];
            ?>
</td>
        <td><?php 
            echo $_smarty_tpl->tpl_vars['person']->value['document'];
            ?>
</td>
        <td><?php 
            echo $_smarty_tpl->tpl_vars['person']->value['email'];
            ?>
</td>
        <td><a href="edit/<?php 
            echo encrypt($_smarty_tpl->tpl_vars['person']->value['id']);
            ?>
">Editar</a></td>
        <td><a href="delete/<?php 
            echo encrypt($_smarty_tpl->tpl_vars['person']->value['id']);
            ?>
">Eliminar</a></td>
      </tr>
    <?php 
        }
        ?>
  </table> 
</body>
</html><?php 
    }
Пример #16
0
 private function pageinfo()
 {
     $this->checkLogin();
     $this->result["sites"]["system"] = "selected";
     $this->result["sites"]["title"] = "用户";
     $this->result["sites"]["url"] = encrypt("account");
 }
Пример #17
0
 public function update()
 {
     $btn_sta = Input::get('btn_sta');
     $inputs = Input::get('check');
     $idRed = Input::get('project_id');
     switch ($btn_sta[0]) {
         case 1:
             foreach ($inputs as $key => $id) {
                 DB::table('project_logs')->where('id', $id)->delete();
             }
             Session::flash('flash_message', "Sukses Menghapus Data !!");
             break;
         case 2:
             foreach ($inputs as $key => $id) {
                 DB::table('project_logs')->where('id', $id)->update(['status' => "Done"]);
             }
             Session::flash('flash_message', "Sukses Memperbaharui Status !!");
             break;
         case 3:
             foreach ($inputs as $key => $id) {
                 DB::table('project_logs')->where('id', $id)->update(['status' => "Undone"]);
             }
             Session::flash('flash_message', "Sukses Memperbaharui Status !!");
             break;
         default:
             break;
     }
     return redirect(\URL::to('project/detail', encrypt($idRed)));
 }
Пример #18
0
function vars_login($urlParams)
{
    global $Path, $dic, $cfg;
    define(SECCION, 'LOGIN');
    $modulo = strtolower(MODULO) . '/';
    $seccion = encrypt(SECCION, 1);
    ## Logica de negocio ##
    // Mensajes via URL
    switch ($urlParams[e]) {
        case 1:
            $msj = $dic[login][msj_noauth];
            break;
        case 2:
            $msj = $dic[login][msj_salir];
            break;
        default:
            $msj = $dic[login][msj_entrar];
            break;
    }
    ## Envio de valores ##
    $negocio = array(MORE => incJs($Path[srcjs] . $modulo . 'login.js'), MODULE => strtolower(MODULO), SECTION => strtolower($seccion), FOLDER => $cfg[app_folder]);
    $texto = array(APP_TITLE => $cfg[app_title], login => $dic[comun][login], usuario => $dic[comun][usuario], clave => $dic[comun][clave], txt_entrar => $dic[comun][entrar], txt_olvido_clave => $dic[login][olvido_clave], MSJ => $msj, txt_footer => $cfg[app_own], ANIO => '2009-' . date('Y'));
    $data = array_merge($negocio, $texto);
    return $data;
}
Пример #19
0
 private function FreeDL()
 {
     if (empty($_POST['step']) || $_POST['step'] != '1') {
         if (!preg_match('@https?://(?:[^/]+\\.)?(?:(?:google\\.com/recaptcha/api)|(?:recaptcha\\.net))/(?:(?:challenge)|(?:noscript))\\?k=([\\w|\\-]+)@i', $this->page, $pid)) {
             $pid = array(1 => '6LcEvs0SAAAAAAykpzcaaxpegnSndWcEWYsSMs0M');
         }
         $data = $this->DefaultParamArr($this->link, empty($this->cookie) ? 0 : encrypt(CookiesToStr($this->cookie)));
         $data['step'] = '1';
         $this->Show_reCaptcha($pid[1], $data);
         exit;
     } else {
         if (empty($_POST['recaptcha_response_field'])) {
             html_error('You didn\'t enter the image verification code.');
         }
         if (!empty($_POST['cookie'])) {
             $this->cookie = StrToCookies(decrypt(urldecode($_POST['cookie'])));
         }
         $query = array();
         $query['type'] = 'recaptcha';
         $query['challenge'] = $_POST['recaptcha_challenge_field'];
         $query['capture'] = $_POST['recaptcha_response_field'];
         $page = $this->GetPage($this->link . '?' . http_build_query($query), $this->cookie);
         $reply = $this->Get_Reply($page);
         if (!empty($reply['err'])) {
             html_error('Error: ' . htmlentities($reply['err']));
         }
         if (empty($reply['href'])) {
             html_error('Error: Download link not found.');
         }
         $this->RedirectDownload($reply['href'], urldecode(basename(parse_url($reply['href'], PHP_URL_PATH))));
     }
 }
Пример #20
0
function set_log($str)
{
    $ci =& get_instance();
    $ci->load->library('user_agent');
    $now = date('Y-m-d H:i:s');
    $thismonth = date('m');
    $thisyear = date('Y');
    $tablename = "sys_log_" . $thismonth . "_" . $thisyear;
    $data = array();
    $data['datetime'] = time();
    $data['action'] = strip_tags(addslashes($str));
    $data['ip'] = $ci->input->ip_address();
    $data['browser'] = $ci->agent->browser();
    $data['platform'] = $ci->agent->agent_string();
    $data['url'] = $ci->uri->uri_string();
    $data['postdata'] = isset($_POST) ? encrypt(json_encode($_POST)) : "";
    $is_exists = $ci->db->table_exists($tablename);
    if ($is_exists) {
        $ci->db->insert($tablename, $data);
    } else {
        $query = "CREATE TABLE IF NOT EXISTS `{$tablename}` (\n\t\t\t\t\t  `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t  `datetime` varchar(255) DEFAULT NULL,\n\t\t\t\t\t  `action` text,\n\t\t\t\t\t  `ip` varchar(255) DEFAULT NULL,\n\t\t\t\t\t  `browser` text,\n\t\t\t\t\t  `url` text,\n\t\t\t\t\t  `platform` text,\n\t\t\t\t\t  `postdata` text,\n\t\t\t\t\t  PRIMARY KEY (`id`)\n\t\t\t\t\t) ENGINE=InnoDB  DEFAULT CHARSET=latin1";
        $create_table = $ci->db->query($query);
        if ($create_table) {
            $ci->db->insert($tablename, $data);
        }
    }
}
Пример #21
0
 private function pageinfo()
 {
     $this->checkLogin();
     $this->result["sites"]["arts"] = "selected";
     $this->result["sites"]["title"] = "资料分类";
     $this->result["sites"]["url"] = encrypt("downcate");
 }
 /**
  * Use this function instead of insert_location so that we can improve this feature in the future
  * 
  * @param string $link The download link of the file
  * @param string $FileName The name of the file
  * @param string $cookie The cookie value
  * @param array $post The post value will be serialized here
  * @param string $referer The page that refered to this link
  * @param string $auth In format username:password
  * @param array $params This parameter allows you to add extra _GET values to be passed on
  */
 public function RedirectDownload($link, $FileName, $cookie = 0, $post = 0, $referer = 0, $force_name = 0, $auth = "", $params = array())
 {
     global $pauth;
     if (!$referer) {
         global $Referer;
         $referer = $Referer;
     }
     $Url = parse_url($link);
     //if (substr($auth,0,6) != "&auth=") $auth = "&auth=" . $auth;
     if (!is_array($params)) {
         // Some problems with the plugin, quit it
         html_error('Plugin problem! Please report, error: "The parameter passed must be an array"');
     }
     $addon = "";
     if (count((array) $params) > 0) {
         foreach ($params as $name => $value) {
             if (is_array($value)) {
                 $value = serialize($value);
             }
             $addon .= '&' . $name . '=' . urlencode($value) . '&';
         }
         $addon = substr($addon, 0, -1);
     }
     $loc = "{$_SERVER['PHP_SELF']}?filename=" . urlencode($FileName) . "&host=" . $Url["host"] . "&port=" . $Url["port"] . "&path=" . urlencode($Url["path"] . ($Url["query"] ? "?" . $Url["query"] : "")) . "&referer=" . urlencode($referer) . "&email=" . ($_GET["domail"] ? $_GET["email"] : "") . "&partSize=" . ($_GET["split"] ? $_GET["partSize"] : "") . "&method=" . $_GET["method"] . "&proxy=" . ($_GET["useproxy"] ? $_GET["proxy"] : "") . "&saveto=" . $_GET["path"] . "&link=" . urlencode($link) . ($_GET["add_comment"] == "on" ? "&comment=" . urlencode($_GET["comment"]) : "") . ($auth ? '&auth=' . ($auth == 1 ? 1 : urlencode($auth)) : "") . ($pauth ? "&pauth={$pauth}" : "") . ($_GET["uploadlater"] ? "&uploadlater=" . $_GET["uploadlater"] . "&uploadtohost=" . $_GET['uploadtohost'] : "") . "&cookie=" . ($cookie ? urlencode(encrypt($cookie)) : 0) . "&post=" . urlencode(serialize($post)) . ($_POST["uploadlater"] ? "&uploadlater=" . $_POST["uploadlater"] . "&uploadtohost=" . urlencode($_POST['uploadtohost']) : "") . ($_POST['autoclose'] ? "&autoclose=1" : "") . (isset($_GET["audl"]) ? "&audl=doum" : "") . $addon;
     if ($force_name) {
         $loc = $loc . "&force_name=" . urlencode($force_name);
     }
     insert_location($loc);
 }
Пример #23
0
/**
* FUNCTION kwspamexperts_CreateAccount
* Create Account
* @param array $params
* @return string
*/
function kwspamexperts_CreateAccount($params)
{
    $api = new kwspamexperts_api($params);
    $domain = !empty($params["customfields"]["Domain"]) ? $params["customfields"]["Domain"] : $params['domain'];
    $password = !empty($params['password']) ? $params["password"] : createServerPassword();
    $email = !empty($params["customfields"]["Email"]) ? $params["customfields"]["Email"] : $params['clientsdetails']['email'];
    $archiving = (int) (!empty($params["configoptions"]["archiving"]) && $params["configoptions"]["archiving"]);
    // update password
    update_query("tblhosting", array("password" => encrypt($password)), array("id" => $params['serviceid']));
    // add domain
    if (empty($domain)) {
        return "Domain cannot be empty. Please enter domain name in Domain field.";
    }
    $api->call("domain/add/domain/" . $domain . "/");
    if ($api->isError()) {
        return $api->error();
    }
    // add email
    $api->call("domainuser/add/domain/" . $domain . "/password/" . $password . "/email/" . $email . "/");
    if ($api->isError()) {
        return $api->error();
    }
    $outgoing = $params["configoption1"] != 'Incoming' ? 1 : 0;
    $incoming = $params["configoption1"] != 'Outgoing' ? 1 : 0;
    $api->call("domain/setproducts/domain/" . $domain . "/incoming/" . $incoming . "/outgoing/" . $outgoing . "/archiving/{$archiving}/");
    if ($api->isError()) {
        return $api->error();
    }
    $res = kwspamexperts_ChangePackage($params);
    if (!$res) {
        return $res;
    }
    return "success";
}
Пример #24
0
 function formjson($data, $iv = true)
 {
     $payload = null;
     $sha512 = null;
     $hash = base64_encode(hash("sha512", $data, true));
     global $encryption;
     //$encryption is determined by request
     //if request sends encrypted data return encrypted
     //if ENCRYPTION is true send encrytped regardless of client
     if (ENCRYPTION || $encryption) {
         $e = null;
         $d = null;
         $key = readkeyfile();
         if ($iv) {
             $iv = base64_encode(mcrypt_create_iv(32));
             $d[0] = 1;
             $d[1] = $hash;
             $d[2] = encrypt($data, $key[0], $iv);
             $d[3] = $iv;
         } else {
             $d[0] = 1;
             $d[1] = $hash;
             $d[2] = encrypt($data, $key[0], $key[1]);
         }
         $payload = json_encode($d);
     } else {
         $d[0] = 0;
         $d[1] = $hash;
         $d[2] = base64_encode($data);
         //if its in plaintext it kersplodes
         $payload = json_encode($d);
     }
     return $payload;
 }
Пример #25
0
 private function pageinfo()
 {
     $this->checkLogin();
     $this->result["sites"]["catalog"] = "selected";
     $this->result["sites"]["title"] = "图片导入";
     $this->result["sites"]["url"] = encrypt("category");
 }
Пример #26
0
function transform_string($array, $array2)
{
    $res = encrypt($array, $array2);
    $res2 = implode($res);
    $array4 = str_split($res2, 2);
    return encrypt_string($array4);
}
Пример #27
0
 /**
  * 后台登陆控制器
  */
 public function login()
 {
     $arr = array('user_login' => I('user_login'), 'user_pass' => encrypt(I('user_pass'), C('ENCRYPTION_KEY')), 'remember-me' => I('remember-me'));
     //处理下次自动登录
     if ($arr['remember-me'] == 1) {
         $account = $arr['user_login'];
         $ip = get_client_ip(0, true);
         $value = $account . '|' . $ip;
         $value = encrypt($value, C('ENCRYPTION_KEY'));
         @setcookie('remember-me', $value, time() + 7 * 24 * 3600, "/");
     }
     $user = M('user')->where(array('user_login' => $arr['user_login']))->find();
     $userinfo = D('user')->getInfo($user['id']);
     if ($user['user_status'] == 0) {
         $this->error('账号被禁用,请联系管理员...');
     }
     if ($user['user_type'] != '管理员') {
         $this->error('无权限登录...');
     }
     if (!$user || $user['user_pass'] != $arr['user_pass']) {
         $this->error('账号密码错误,请重试...');
     }
     $data = array('id' => $user['id'], 'last_login_ip' => get_client_ip(0, true), 'last_login_time' => date("Y-m-d H:i:s"));
     $result = M('user')->save($data);
     if (!$result) {
         $this->error('登录失败,请重试...');
     }
     session('uid', $user['id']);
     session('username', $userinfo['username']);
     session('last_login_time', $data['last_login_time']);
     session('last_login_ip', $data['last_login_ip']);
     $this->success('登陆成功', U('Index/index'));
 }
Пример #28
0
 private function pageinfo()
 {
     $this->checkLogin();
     $this->result["sites"]["order"] = "selected";
     $this->result["sites"]["title"] = "订单";
     $this->result["sites"]["url"] = encrypt("order");
 }
Пример #29
0
 private function pageinfo()
 {
     $this->checkLogin();
     $this->result["sites"]["system"] = "selected";
     $this->result["sites"]["title"] = "部门";
     $this->result["sites"]["url"] = encrypt("custormer");
 }
Пример #30
0
 public static function isLoggedIn()
 {
     if (!empty($_SESSION['Email']) && !empty($_SESSION['Wachtwoord'])) {
         $email = $_SESSION['Email'];
         $pass = $_SESSION['Wachtwoord'];
         $registerSession = false;
     } else {
         if (!empty($_POST['txtEmail']) && !empty($_POST['txtWachtwoord'])) {
             $email = $_POST['txtEmail'];
             $pass = encrypt($_POST['txtWachtwoord']);
             $registerSession = true;
         } else {
             return false;
         }
     }
     if (($gebruiker = Gebruiker::getByEmailAndPass($email, $pass)) !== false) {
         if ($registerSession) {
             $_SESSION['GebruikerID'] = $gebruiker->getProperty('GebruikerID');
             $_SESSION['GroepID'] = $gebruiker->getProperty('GroepID');
             $_SESSION['BedrijfID'] = $gebruiker->getProperty('BedrijfID');
             $_SESSION['Aanmaker'] = $gebruiker->getProperty('Aanmaker');
             $_SESSION['Email'] = $email;
             $_SESSION['Wachtwoord'] = $pass;
         }
         return true;
     } else {
         return false;
     }
 }