Active
Project:
Content Profile
Version:
6.x-1.0
Component:
Base module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 May 2009 at 16:45 UTC
Updated:
20 Jan 2011 at 22:03 UTC
I have an issue the same as
But instead of using the bio module I'm using Content Profile.
Basically I need an administrator to approve registrations, but as I have profile fields in the registration, the user is created as 'blocked' and their profile node is set as 'published'. The profile then appears in the user directory before they are verified.
What is the best approach to get around this?
Comments
Comment #1
mattfielding commentedI decided to write a module to handle this. This will be my first attempt at writing one!
It will add a trigger and an action.
Comment #2
eliza411 commentedThis would be incredibly useful . . . I'd love to use it when you're done. :)
Comment #3
mattfielding commentedI made a start and almost got there before getting sidetracked. Will return to this next week hopefully.
Comment #4
eliza411 commentedIf you want to share your start, I have someone who would finish and share it back. If not, we can start on our own solution and we'll post when we get there.
Comment #5
vivianspencer commentedsubscribing
Comment #6
vivianspencer commentedWhy not just use the Rules module for now? Below is the export of a rule I created to perform this needed functionality
Comment #7
eliza411 commentedI'd never used the Rules module before. I installed it and adjusted the rule above to meet my specific needs, which were to publish and unpublish the profile when a user was made active or blocked. Thank you.
Comment #8
fagoPerhaps you could export your rules too and add a short tutorial in the handbooks? -> A good place to post it would be http://drupal.org/node/298483.
Comment #9
joostvdl commented#7: Is there an export of your ruleset available somewhere?
Comment #10
nedjoHere's some custom code that will synchronize the user status to content node status:
Comment #11
nedjoAnd the converse for synchronizing content profile status when a user is blocked/unblocked (thought not that this is not compatible with the code in #10, due to the way one calls the other):
Comment #12
laroccadahouse commentedI would like to have any content that a blocked user is the author of to be unpublished and set to a specific workflow state (i.e., in draft). I wanted to use a rule to do this, but I couldn't figure out how to trigger the rule when a user's status is changed.
I am using the Inactive User module to set the users status automatically after a certain amount of time of inactivity.
Comment #13
fagoTry you using rules, you could configure it with it. -> http://drupal.org/project/rules
Use the "user has been updated" event and compare the user status using the token.
Comment #14
neclimdulThis would be handy. I couldn't find anyway to do this with rules because status wasn't an exposed token. Nedjo's psuedo module seems to be working great.