diff --git a/src/User.php b/src/User.php index 2b380fc..4d8a47d 100644 --- a/src/User.php +++ b/src/User.php @@ -44,7 +44,7 @@ class User public function __construct($attributes = []) { foreach ($attributes as $key => $value) { - if (property_exists($this, 'key')) { + if (property_exists($this, $key)) { $this->$key = $value; } } @@ -155,4 +155,4 @@ public function getResponseData() return $data; } -} \ No newline at end of file +}