Compare commits

..

2 commits

2 changed files with 1 additions and 7 deletions

View file

@ -285,7 +285,6 @@ class Ldap extends Backend {
$updated_attrs = []; $updated_attrs = [];
$deleted_attrs = []; $deleted_attrs = [];
foreach($changes as $attr => $value) { foreach($changes as $attr => $value) {
if ($attr == "dn") continue;
if (!array_key_exists($attr, $attrs)) { if (!array_key_exists($attr, $attrs)) {
Log::error( Log::error(
"Ldap::update_user(%s): Changes on unknown attribute %s provided", "Ldap::update_user(%s): Changes on unknown attribute %s provided",

View file

@ -4,7 +4,6 @@ namespace EesyPHP\Auth;
use EesyPHP\Log; use EesyPHP\Log;
use function EesyPHP\ensure_is_array; use function EesyPHP\ensure_is_array;
use function EesyPHP\vardump;
class User { class User {
@ -73,7 +72,6 @@ class User {
* @return void * @return void
*/ */
public function __set($key, $value) { public function __set($key, $value) {
Log::trace("%s->__set(%s): new value=%s", $this, $key, vardump($value));
switch ($key) { switch ($key) {
case 'username': case 'username':
$this -> username = strval($value); $this -> username = strval($value);
@ -134,10 +132,7 @@ class User {
* @return bool * @return bool
*/ */
public function save() { public function save() {
if (!isset($this -> original_user)) { if (!isset($this -> original_user)) return true;
Log::debug("%s->save(): no change to save", $this);
return true;
}
return call_user_func( return call_user_func(
array($this -> backend, 'update_user'), array($this -> backend, 'update_user'),
$this -> original_user, $this -> info, true $this -> original_user, $this -> info, true