Skip to content

Commit c14b9f1

Browse files
committed
Resets derived properties when changing username or id.
1 parent fb7d9ba commit c14b9f1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Objects/MacUser.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ public function getPasswordFromKeychain($key)
159159
*/
160160
public function setId($id)
161161
{
162-
$this->_id = $id;
162+
$this->_id = $id;
163+
$this->_dir = null;
164+
$this->_realName = null;
165+
$this->_library = null;
163166

164167
return $this;
165168
}
@@ -199,6 +202,9 @@ public function setPasswordInKeychain($key, $pw)
199202
public function setUsername($username)
200203
{
201204
$this->_username = $username;
205+
$this->_dir = null;
206+
$this->_realName = null;
207+
$this->_library = null;
202208

203209
return $this;
204210
}

0 commit comments

Comments
 (0)