{"action":"created","issue":{"url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/81","repository_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel","labels_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/81/comments","events_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/81/events","html_url":"https://github.com/Adldap2/Adldap2-Laravel/issues/81","id":144939577,"number":81,"title":"ADLDAP2 Adding/Creating User Issue","user":{"login":"ParthSarth","id":10643520,"avatar_url":"https://avatars.githubusercontent.com/u/10643520?v=3","gravatar_id":"","url":"https://api.github.com/users/ParthSarth","html_url":"https://github.com/ParthSarth","followers_url":"https://api.github.com/users/ParthSarth/followers","following_url":"https://api.github.com/users/ParthSarth/following{/other_user}","gists_url":"https://api.github.com/users/ParthSarth/gists{/gist_id}","starred_url":"https://api.github.com/users/ParthSarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParthSarth/subscriptions","organizations_url":"https://api.github.com/users/ParthSarth/orgs","repos_url":"https://api.github.com/users/ParthSarth/repos","events_url":"https://api.github.com/users/ParthSarth/events{/privacy}","received_events_url":"https://api.github.com/users/ParthSarth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2016-03-31T15:48:01Z","updated_at":"2016-04-04T12:28:47Z","closed_at":null,"body":"@stevebauman\r\n\r\nHi, I'm an having as issue with creating a user with Adldap.\r\n\r\nRelevant code:\r\n\r\n```\r\n$attributes=array(\r\n                \"userName\"=>$employee->userName,\r\n                \"logon_name\"=>$employee->userName.\"@mydc.com\",\r\n                \"firstname\"=>$employee->FN,\r\n                \"surname\"=>$employee->LN,\r\n                \"company\"=>\"MIG\",\r\n                \"email\"=>$employee->email,\r\n                \"container\"=>array(\"User Accounts\",\"Users\"),\r\n                \"password\"=>$fields['password'],\r\n            );\r\n        $user = Adldap::users()->create($attributes);\r\n\r\n        dd($user); //RETURNS FALSE\r\n```\r\n$user should be true but it returns as false. Also tried with 'newInstance()' :\r\n\r\n`\r\n```\r\n$adldap = new \\Adldap\\Adldap($config);\r\n$user = $adldap->users()->newInstance();\r\n        $user->setDistinguishedName('CN=John Doe,CN=Users,DC=mydc,DC=com');\r\n        $user->setFirstName($employee->FN);\r\n        $user->setLastName($employee->LN);\r\n        $user->setUserAccountControl('512');\r\n        $user->setAccountName($employee->userName);\r\n    $user->setPassword('H@tr!ck');\r\n\r\n        $adNewUser = $user->save(); \r\n        dd($adNewUser); //RETURNS FALSE\r\n````\r\n"},"comment":{"url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/comments/205274351","html_url":"https://github.com/Adldap2/Adldap2-Laravel/issues/81#issuecomment-205274351","issue_url":"https://api.github.com/repos/Adldap2/Adldap2-Laravel/issues/81","id":205274351,"user":{"login":"ParthSarth","id":10643520,"avatar_url":"https://avatars.githubusercontent.com/u/10643520?v=3","gravatar_id":"","url":"https://api.github.com/users/ParthSarth","html_url":"https://github.com/ParthSarth","followers_url":"https://api.github.com/users/ParthSarth/followers","following_url":"https://api.github.com/users/ParthSarth/following{/other_user}","gists_url":"https://api.github.com/users/ParthSarth/gists{/gist_id}","starred_url":"https://api.github.com/users/ParthSarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParthSarth/subscriptions","organizations_url":"https://api.github.com/users/ParthSarth/orgs","repos_url":"https://api.github.com/users/ParthSarth/repos","events_url":"https://api.github.com/users/ParthSarth/events{/privacy}","received_events_url":"https://api.github.com/users/ParthSarth/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T12:28:47Z","updated_at":"2016-04-04T12:28:47Z","body":"Hey, back at work today and just got a chance to try your suggestions.\r\n\r\nDoing:\r\n```\r\n// Enabling the user before setting a password.\r\nif ($user->save() && $user->enable()) {\r\n    $user->setPassword('Password123');\r\n\r\n    $user->save();\r\n}\r\n```\r\ngives me this error- ```\r\nFatalErrorException in AddEmployeeController.php line 110:\r\nCall to undefined method Adldap\\Models\\User::enable()\r\n```\r\n\r\nAnd the first one just gives me false when I `dd($user->save());` after save password.\r\n\r\nI think enabling the user and then setting password might do the trick, but there is not method to call to enable the new user. "}}