Compare commits
2 commits
13c7fcb0a2
...
78144a4dfc
Author | SHA1 | Date | |
---|---|---|---|
|
78144a4dfc | ||
|
c94b878bc2 |
2 changed files with 7 additions and 1 deletions
|
@ -285,6 +285,7 @@ class Ldap extends Backend {
|
|||
$updated_attrs = [];
|
||||
$deleted_attrs = [];
|
||||
foreach($changes as $attr => $value) {
|
||||
if ($attr == "dn") continue;
|
||||
if (!array_key_exists($attr, $attrs)) {
|
||||
Log::error(
|
||||
"Ldap::update_user(%s): Changes on unknown attribute %s provided",
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace EesyPHP\Auth;
|
|||
|
||||
use EesyPHP\Log;
|
||||
use function EesyPHP\ensure_is_array;
|
||||
use function EesyPHP\vardump;
|
||||
|
||||
class User {
|
||||
|
||||
|
@ -72,6 +73,7 @@ class User {
|
|||
* @return void
|
||||
*/
|
||||
public function __set($key, $value) {
|
||||
Log::trace("%s->__set(%s): new value=%s", $this, $key, vardump($value));
|
||||
switch ($key) {
|
||||
case 'username':
|
||||
$this -> username = strval($value);
|
||||
|
@ -132,7 +134,10 @@ class User {
|
|||
* @return bool
|
||||
*/
|
||||
public function save() {
|
||||
if (!isset($this -> original_user)) return true;
|
||||
if (!isset($this -> original_user)) {
|
||||
Log::debug("%s->save(): no change to save", $this);
|
||||
return true;
|
||||
}
|
||||
return call_user_func(
|
||||
array($this -> backend, 'update_user'),
|
||||
$this -> original_user, $this -> info, true
|
||||
|
|
Loading…
Reference in a new issue