questionnaire module
I am working on a questionnaire module, which will redirect the user after login to ask a number of questions. This is easy to do using the _user hook. However, I would also like to be able to temporarily suspend a user's access to the site, so that, until they have finished entering the data, they cannot gain access to any site content.
Does anyone konw how I might accomplish this? If I user user_logout(), then it is not possible to get the user to post their responses, as the session is immediately terminated. If I update the users database to set status to 0, then the changes won't take place until a subsequent login. I was thinking another way might be to create a new role called 'restricted' and set the $user->rid to this, but I'd still have the same issue of changes not taking place until a new login.
Any help appreciated.

This will make users angry
I would also like to be able to temporarily suspend a user's access to the site, so that, until they have finished entering the data, they cannot gain access to any site content.
This sounds like a bullet proof way to irritate and alienate your users. Maybe a better strategy would be to keep track of users that has not answered the questionaire, and remaind them about it at a later occasion.
first of all, this might turn
first of all, this might turn out to become a very usefull if it is flexible enough & you release it :)
depending on the type of sites using the module there may be many legitimate reasons for why a user can't finsh the questionare right away.
i urge you to reconsider and impelement a method of reminding / nagging the user that he og she must fill out the questionare.
:water
Is true...
I considered the same. I am actually planning doing both. I agree that I may alienate users if they are immediately hit with a questionnaire that they need to fill in. The idea is to have a period of time whereby they receive reminders, after which the account will become suspended until the questionnaire is filled in. I think that this should then cover all possibilities. I will commit the module to CVS once I am happy with it - and yes it will be flexible. Currently the module allows users to create questionnaires in XML, along with some basic tools to help generate new questionnaires very easily. Users are then able to associate questionnaires with particular user groups.
did you finish this module in the end?
hi tlodge (tom lodge?) did you finish this module in the end? I am interested to use what you were trying to achieve (preferably with the nagging, not the blocking ;) ).
Bya,
Harro