Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.5
Component:
userreference.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Mar 2009 at 21:40 UTC
Updated:
24 Aug 2009 at 04:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
petrescs commentedsubscribing - checking Blocked status box is not saved, only the default marked Active checkbox is preserved
Comment #2
aharown07 commentedAlso having this problem. We would like very much to be able to reference blocked users when we write our user histories. Anybody got patch ideas? Beyond my skills unfortunately.
Comment #3
aharown07 commentedWorkaround: if you have Views, a View that includes both blocked and unblocked does work as the source for the user ref field... just make the View then choose it under Advanced.
Still a bug though since there's a checkbox there that doesn't work.
Comment #4
hefox commentedAn easy but wonky way:
1) make a a define('BLOCKED_USER_VALUE',2) or maybe 'blocked'.
2) in the form have BLOCKED_USER_VALUE instead of 0 as the key
3) Replace BLOCKED_USER_VALUE with 0 for DB call.
(Don't have the code in front of me so no line numbers. but using above step 2 was probably line 75 and step 3 was probably line 792).
Comment #5
ize commentedsubscribe
Comment #6
markus_petrux commentedProbably the user status option would have to be converted into a 'radios' element with the following options:
To do so, we need to change a little the code in userreference.module, but also implement a new hook_update_N() function to migrate the field settings to the new format (from array() to integer).
If Active or Blocked has been selected can be checked using is_numeric().
Comment #7
darrellduane commentedalso having this problem, subscribe. I'd like to import legacy data that references blocked users and node import is blocking me from doing this.
Comment #8
darrellduane commentedAs a workaround for this issue, I exported the CCK definition, searched for the UID field and edited the section referenceable_status so that it appears as below (I changed 0 => 0, to be 0 => 1).
I then deleted the CCK type and imported the edited definition. This User Reference field now accepts both blocked and unblocked users.
'referenceable_status' =>
array (
1 => 1,
0 => 1,
),
Comment #9
markus_petrux commentedAttached patch proceeds as described in #6. Requires running update.php
Please test and let me know if this approach worked. Thanks
Comment #10
markus_petrux commentedBetter title. :P
Comment #11
markus_petrux commentedCommitted the patch in #9 to CVS (branches CCK2 and CCK3).