public static function installUserAttributes(Package $pkg) { //user attributes for customers $uakc = AttributeKeyCategory::getByHandle('user'); $uakc->setAllowAttributeSets(AttributeKeyCategory::ASET_ALLOW_MULTIPLE); //define attr group, and the different attribute types we'll use $custSet = AttributeSet::getByHandle('customer_info'); if (!is_object($custSet)) { $custSet = $uakc->addSet('customer_info', t('Store Customer Info'), $pkg); } $text = AttributeType::getByHandle('text'); $address = AttributeType::getByHandle('address'); Installer::installUserAttribute('email', $text, $pkg, $custSet); Installer::installUserAttribute('billing_first_name', $text, $pkg, $custSet); Installer::installUserAttribute('billing_last_name', $text, $pkg, $custSet); Installer::installUserAttribute('billing_address', $address, $pkg, $custSet); Installer::installUserAttribute('billing_phone', $text, $pkg, $custSet); Installer::installUserAttribute('shipping_first_name', $text, $pkg, $custSet); Installer::installUserAttribute('shipping_last_name', $text, $pkg, $custSet); Installer::installUserAttribute('shipping_address', $address, $pkg, $custSet); }