commit
e7efc7da13
|
@ -154,7 +154,7 @@ class LDAP implements LDAPInterface
|
||||||
*/
|
*/
|
||||||
public function getDataForMattermost($ldap_base_dn, $ldap_filter, $ldap_bind_dn, $ldap_bind_pass, $ldap_search_attribute, $user)
|
public function getDataForMattermost($ldap_base_dn, $ldap_filter, $ldap_bind_dn, $ldap_bind_pass, $ldap_search_attribute, $user)
|
||||||
{
|
{
|
||||||
$attribute=array("cn","mail");
|
$attribute=array("cn","mail","displayName");
|
||||||
|
|
||||||
if (!is_string($ldap_base_dn)) {
|
if (!is_string($ldap_base_dn)) {
|
||||||
throw new InvalidArgumentException('First argument to LDAP/getData must be the ldap base directory name (string). Ex: o=Company');
|
throw new InvalidArgumentException('First argument to LDAP/getData must be the ldap base directory name (string). Ex: o=Company');
|
||||||
|
@ -212,7 +212,9 @@ class LDAP implements LDAPInterface
|
||||||
throw new Exception('An error has occured during ldap_get_values execution (complete name). Please check parameter of LDAP/getData.');
|
throw new Exception('An error has occured during ldap_get_values execution (complete name). Please check parameter of LDAP/getData.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return array("mail" => $mail[0], "cn" => $cn[0]);
|
$displayName = ldap_get_values($this->ldap_server, $data, "displayName");
|
||||||
|
|
||||||
|
return array("mail" => $mail[0], "cn" => $cn[0], "displayName" => $displayName[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -41,7 +41,7 @@ else
|
||||||
{
|
{
|
||||||
messageShow($prompt_template, 'Username has incorrect format ... Please try again');
|
messageShow($prompt_template, 'Username has incorrect format ... Please try again');
|
||||||
}
|
}
|
||||||
elseif (strlen($_POST['password']) > 64 || strlen($_POST['password']) <= 7)
|
elseif (strlen($_POST['password']) > 64)
|
||||||
{
|
{
|
||||||
messageShow($prompt_template, 'Password has incorrect format ... Please try again');
|
messageShow($prompt_template, 'Password has incorrect format ... Please try again');
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ try {
|
||||||
// Here is the patch for Mattermost 4.4 and newer. Gitlab has changed the JSON output of oauth service. Many data are not used by Mattermost, but there is a stack error if we delete them. That's the reason why date and many parameters are null or empty.
|
// Here is the patch for Mattermost 4.4 and newer. Gitlab has changed the JSON output of oauth service. Many data are not used by Mattermost, but there is a stack error if we delete them. That's the reason why date and many parameters are null or empty.
|
||||||
$resp = array(
|
$resp = array(
|
||||||
"id" => $assoc_id,
|
"id" => $assoc_id,
|
||||||
"name" => $data['cn'],
|
"name" => strlen($data['displayName']) > 0 ? $data['displayName'] : $data['cn'],
|
||||||
"username" => $user,
|
"username" => $user,
|
||||||
"state" => "active",
|
"state" => "active",
|
||||||
"avatar_url" => "",
|
"avatar_url" => "",
|
||||||
|
|
|
@ -47,12 +47,12 @@ table {
|
||||||
|
|
||||||
#form_icon img {
|
#form_icon img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 450px;
|
max-width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#form_icon_prompt img {
|
#form_icon_prompt img {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
max-width: 350px;
|
max-width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ table {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
transform: translate(-50%, 25%);
|
transform: translate(-50%, 8%);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Style input fields */
|
/* Style input fields */
|
||||||
|
@ -86,7 +86,7 @@ table {
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
|
||||||
/* Make the borders more round */
|
/* Make the borders more round */
|
||||||
border-radius: 12px;
|
border-radius: 5px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ table {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-top: 25%;
|
margin-top: 10%;
|
||||||
margin-right: 2%;
|
margin-right: 2%;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue