fix for undefined user

This commit is contained in:
snipe 2016-07-15 16:38:49 -07:00
parent 92175eb700
commit 27b8d326e3

View file

@ -184,11 +184,7 @@ class Ldap extends Model
// Create user from LDAP data
if (!empty($item["username"])) {
if (!$user) {
$user = new User;
}
$user = new User;
$user->first_name = $item["firstname"];
$user->last_name = $item["lastname"];
$user->username = $item["username"];