Skip to content

Commit

Permalink
* [FIX] Related #503. Fixed issue when clearing search data. Favorite…
Browse files Browse the repository at this point in the history
… icon was not reset. Thanks to @k-s-dean  for the feedback

* [FIX] Fixed issue when saving user's password when login through LDAP
  • Loading branch information
nuxsmin committed Mar 16, 2017
1 parent c0c142f commit aab802a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion inc/SP/Controller/LoginController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ protected function authLdap(LdapAuthData $LdapAuthData)
// Verificamos si el usuario existe en la BBDD
if (UserLdap::checkLDAPUserInDB($this->UserData->getLogin())) {
// Actualizamos el usuario de LDAP en MySQL
UserLdap::getItem($this->UserData)->update();
UserLdap::getItem($this->UserData)->updateOnLogin();
} else {
// Creamos el usuario de LDAP en MySQL
UserLdap::getItem($this->UserData)->add();
Expand Down
6 changes: 4 additions & 2 deletions inc/SP/Mgmt/Users/UserLdap.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use SP\Core\Crypt\Hash;
use SP\Core\Exceptions\SPException;
use SP\Core\Messages\LogMessage;
use SP\DataModel\UserLoginData;
use SP\Log\Email;
use SP\Log\Log;
use SP\Storage\DB;
Expand All @@ -39,6 +40,7 @@
* Class UserLdap
*
* @package SP
* @property UserLoginData $itemData
*/
class UserLdap extends User
{
Expand Down Expand Up @@ -111,7 +113,7 @@ public function add()
$Data->addParam((int)$this->itemData->isUserIsAdminAcc());
$Data->addParam((int)$this->itemData->isUserIsDisabled());
$Data->addParam((int)$this->itemData->isUserIsChangePass());
$Data->addParam(Hash::hashKey($this->itemData->getUserPass()));
$Data->addParam(Hash::hashKey($this->itemData->getLoginPass()));
$Data->setOnErrorMessage(__('Error al guardar los datos de LDAP', false));

DB::getQuery($Data);
Expand Down Expand Up @@ -208,7 +210,7 @@ public function updateOnLogin()

$Data = new QueryData();
$Data->setQuery($query);
$Data->addParam(Hash::hashKey($this->itemData->getUserPass()));
$Data->addParam(Hash::hashKey($this->itemData->getLoginPass()));
$Data->addParam($this->itemData->getUserName());
$Data->addParam($this->itemData->getUserEmail());
$Data->addParam($this->itemData->getUserLogin());
Expand Down
5 changes: 4 additions & 1 deletion inc/themes/material-blue/js/app-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,14 @@ sysPass.Theme = function (Common) {
var $frmSearch = $("#frmSearch");
var $resContent = $("#res-content");

$frmSearch.find("button.btn-clear").on("click", function (e) {
$(".icon-searchfav").find("i").removeClass("mdl-color-text--amber-A200");
});

$frmSearch.find(".icon-searchfav").on("click", function () {
var $icon = $(this).find("i");
var $searchfav = $frmSearch.find("input[name='searchfav']");


if ($searchfav.val() == 0) {
$icon.addClass("mdl-color-text--amber-A200");
$icon.attr("title", Common.config().LANG[53]);
Expand Down
9 changes: 5 additions & 4 deletions inc/themes/material-blue/js/app-theme.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aab802a

Please sign in to comment.