Fixed User name input (option throws exception for bad default value)

Affected version
PR10

AndyB

Well-known member
I'm trying the new User name input function.

1502601603491.png

The problem is when I try to save a blank field in the Option, I get this error:

1502601695839.png

I could change the Data type to string, but then I would need to in the PHP convert the username to a userId. Perhaps allow a non-numeric value for this type of data?
 

AndyB

Well-known member
Another question, how could it be made so that only one username can be entered?
 

Mike

XenForo developer
Staff member
That said, we should probably try to give a better error here. However, the problem is mostly the data type you selected and the lack of a default value.

I'll move this back solely in terms of giving a better error/preventing this exception.
 

AndyB

Well-known member
However, the problem is mostly the data type you selected and the lack of a default value.
Is there any way to have it so the field can be left blank without getting this error message?

1502647075202.png

Seams the only way currently is to have the Data type as a "String", but that returns the username, I would like to have it return the userId.
 

Kier

XenForo developer
Staff member
I've looked into this, and it would appear that unrelated changes have made this error disappear.
 
Top