fixed qr code
This commit is contained in:
@@ -23,12 +23,11 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||
ldap_start_tls($ldapconn)
|
||||
or error_die($ldapconn, "cannot start LDAP TLS");
|
||||
if ($ldapbind = @ldap_bind($ldapconn, $checkuser.'='.$tstusername.','.$ldapbase, $password)) {
|
||||
$search = ldap_search($ldapconn, $ldapbase, $checkuser.'='.$tstusername, array('mail\
|
||||
', 'cn'));
|
||||
$search = ldap_search($ldapconn, $ldapbase, $checkuser.'='.$tstusername, array('mail', 'cn'));
|
||||
$data = ldap_get_entries($ldapconn, $search);
|
||||
ldap_close($ldapconn);
|
||||
$username = $tstusername;
|
||||
$email = array('count' => 1, 0 => $username.'@'.$_SERVER[HTTP_HOST]);
|
||||
$email = array('count' => 1, 0 => $username.'@'.$_SERVER['HTTP_HOST']);
|
||||
$fullname = $username;
|
||||
if ($data['count']==1) {
|
||||
if (isset($data[0]['mail']))
|
||||
@@ -36,6 +35,7 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||
if (isset($data[0]['cn'][0]))
|
||||
$fullname = $data[0]['cn'][0];
|
||||
}
|
||||
error_log(print_r($data, true));
|
||||
} else {
|
||||
error_log("user login failed: ".$checkuser.'='.$tstusername.','.$ldapbase);
|
||||
error_log(ldap_error($ldapconn));
|
||||
@@ -43,4 +43,4 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||
basicAuth();
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
require_once('/usr/share/phpqrcode/qrlib.php'); // configure path to phpqrcode
|
||||
require_once('/usr/share/phpqrcode/phpqrcode.php'); // configure path to phpqrcode
|
||||
$imagepath = "/path/to/your/files";
|
||||
$thumbpath = "/var/tmp/sharing-gallery/thumbnails/";
|
||||
$max_validity_days = "30";
|
||||
$font = "DejaVu-Sans";
|
||||
$preview_num = "5";
|
||||
$default_mail_subject = "Sharing Gallery: See my Fotos";
|
||||
$default_mail_text = "Fotos from my gallery:\n\npassword = PASSWORD\n\nlink: LINK\n\nRegards\nUSERNAME";
|
||||
$default_mail_text = "Fotos from my gallery, please follow the link:\n\npassword: PASSWORD\n\nlink:\nLINK\n\nRegards\nUSERNAME";
|
||||
$default_mailto = "";
|
||||
$fallback_mail_replyto = "";
|
||||
?>
|
||||
?>
|
||||
|
Reference in New Issue
Block a user