I have a website with more than 2000 users. I had a problem with forgotten passwords when one time login link sent to emails. your module is good for this but I want mass change of users security answers for users that have not yet entered their answers. I can not see the options in views fields to edit. is there any Solution?

Comments

dev18.addweb’s picture

Can you please confirm that you want a list of all users who has not entered security answer and you want to persorm action on this list.

Alternatively, you can make a block that is visible to only those users who has yet to provide security answer. Use following code to get check if logged in user has provided answer or not.

$question =  db_query('SELECT pr.qid, pr.question, pru.answer
      FROM {password_reset_users} pru
      INNER JOIN {password_reset} pr USING (qid)
      WHERE pru.uid = :uid', array(':uid' => 'account_uid'))
      ->fetchObject();
if($question === FALSE) {
// write your code when security answer not set
}

Let me know incase of any concern/query for the same.