. */ namespace FireflyIII\Ldap; use FireflyIII\User as DatabaseUser; use LdapRecord\Models\OpenLDAP\User as LdapUser; /** * Class AttributeHandler */ class AttributeHandler { /** * @param LdapUser $ldap * @param DatabaseUser $database */ public function handle(LdapUser $ldap, DatabaseUser $database) { $database->email = $ldap->getFirstAttribute('mail'); $database->save(); } }