I'm trying to import some users but it is not working with OG. See my file example below:
Example 1:
mail,name,pass,field_nome,roles,groups
user23@trocaremail.com,23_user,Qpt1724,My User,student,1st grade|high school
mail,name,pass,field_nome,roles,groups
user23@trocaremail.com,23_user,Qpt1724,My User,student,high school | first grade
Result: user subscribed to "high school" group only
Example 2:
mail,name,pass,field_nome,roles,groups
user23@trocaremail.com,23_user,Qpt1724,My User,student,first grade
Result: user subscribed to "high school" group only. (yes, "high school" - this group it has the lowest node id)
Neither working with id instead of title.
The "1st grade" group is not imported because the uif_plus_get_og_group function:
Line 598 (og version 1) and 609 (og version 2):
$column = (intval($group) > 0) ? 'g.gid' : 'g.label';
The return of intval is "1" for strings that contains numbers in the beggining, resulting in a attempt to retrieve 'gid' using the og title.
Modules version:
Organic Groups - 7.x-1.5
UIF - 7.x-1.4
UIF Plus - 7.x-1.2
Comments
Comment #1
dakalaNo longer an issue. If it still is, please re-open
Comment #1.0
dakalaI´ve discovered the error and had to update the example to reflect the real case.
Comment #2
alibama commentedI've found that working with GID seems to work well with multiple values, but with the labels it does not work. thanks for an otherwise awesome tool