gutterboy Posted August 31, 2014 Report Posted August 31, 2014 When I create clients via the API via the clients::create method and then go to edit them via the admin panel by default it seems they have "Use email as username" selected under the "Authentication" section even though I passed in a username and password - and if I check the users table in the database it shows the username I passed in the username field. How can I get it to use the "specify a username" by default? Thanks! Quote
Blesta Addons Posted August 31, 2014 Report Posted August 31, 2014 have you passed the settiings with username_type ? * - settings An array of client settings including: * - default_currency * - language * - username_type * - tax_id * - tax_exempt the username_type accept (email/username) as value Quote
gutterboy Posted August 31, 2014 Author Report Posted August 31, 2014 have you passed the settiings with username_type ? * - settings An array of client settings including: * - default_currency * - language * - username_type * - tax_id * - tax_exempt the username_type accept (email/username) as value Where do you see that? This is the docs I see for that method: An array of client info including: - username The username for this user. Must be unique across all companies for this installation. - new_password The password for this user - confirm_password The password for this user - client_group_id The client group this user belongs to - status The status of this client ('active', 'inactive',' 'fraud') (optional, default active) - first_name The first name of this contact - last_name The last name of this contact - title The business title for this contact (optional) - company The company/organization this contact belongs to (optional) - email This contact's email address - address1 This contact's address (optional) - address2 This contact's address line two (optional) - city This contact's city (optional) - state The 3-character ISO 3166-2 subdivision code, requires country (optional) - zip The zip/postal code for this contact (optional) - country The 3-character ISO 3166-1 country code, required if state is given (optional) - numbers An array of number data including (optional): - number The phone number to add - type The type of phone number 'phone', 'fax' (optional, default 'phone') - location The location of this phone line 'home', 'work', 'mobile' (optional, default 'home') - custom An array of custom fields in key/value format where each key is the custom field ID and each value is the value - settings An array of client settings including: - default_currency - language - username_type - tax_id - tax_exempt - send_registration_email 'true' to send client welcome email (default), 'false' otherwise http://source-docs.blesta.com/class-Clients.html Quote
Blesta Addons Posted August 31, 2014 Report Posted August 31, 2014 in An array of client info including: - username The username for this user. Must be unique across all companies for this installation. - new_password The password for this user - confirm_password The password for this user - client_group_id The client group this user belongs to - status The status of this client ('active', 'inactive',' 'fraud') (optional, default active) - first_name The first name of this contact - last_name The last name of this contact - title The business title for this contact (optional) - company The company/organization this contact belongs to (optional) - email This contact's email address - address1 This contact's address (optional) - address2 This contact's address line two (optional) - city This contact's city (optional) - state The 3-character ISO 3166-2 subdivision code, requires country (optional) - zip The zip/postal code for this contact (optional) - country The 3-character ISO 3166-1 country code, required if state is given (optional) - numbers An array of number data including (optional): - number The phone number to add - type The type of phone number 'phone', 'fax' (optional, default 'phone') - location The location of this phone line 'home', 'work', 'mobile' (optional, default 'home') - custom An array of custom fields in key/value format where each key is the custom field ID and each value is the value - settings An array of client settings including: - default_currency - language - username_type - tax_id - tax_exempt - send_registration_email 'true' to send client welcome email (default), 'false' otherwise the default value for username_type is email . Quote
gutterboy Posted August 31, 2014 Author Report Posted August 31, 2014 in the default value for username_type is email . Haha........ guess I missed that bit. Thanks! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.