The may be a problem with Drupal itself, not necessarily this module, but I thought I'd ask here first.

When logged in as admin, I can access the site user list, and details about each person (view their profiles), no problem. However, when I'm logged in as a regular user, I can view my own profile off the site user list, and a few other users as well (ones who registered a few weeks ago) but when I click "view" for any user that has registered more recently, I get a "page not found" error. It's really bizarre, but the only thing I can think of is that I changed a few profile fields between now and then.

Any ideas?

Comments

anonymous562’s picture

I think I may have found an answer to my question...this thread seems to discuss the problem:

http://drupal.org/node/66653

I'd like to create this as a cron job that runs automatically. Perhaps you have some insight into this? :)

pukku’s picture

Assigned: Unassigned » pukku
Status: Active » Closed (fixed)

Hi! I'm a bit confused; you've indicated that you're using version 5.x, but the issue you link to is for version 4.7.x.

At any rate, if you want to create a module to run an SQL query every cron run, you would do the following:

create a file named 'local_fix_user_table.module', containing the code (I'm using the query from the issue you linked to)


function local_fix_user_table_cron() {
  db_query("UPDATE {users} SET access = created WHERE access = 0");
}

// if you're running 4.7.x, you would also want the following function.
// leave it out for 5.x and see the bit below about a .info file

function local_fix_user_table_help($section) {
  switch($section) {
    case 'admin/modules#description':
      return t('Run a query to fix a bug with the users table every cron job');
  }
}

if you're using 5.x, you'll also need a .info file (called local_fix_user_table.info):

name = Local: fix user table
description = FIx a bug in the user table every cron run

Put these two files (or just the .module file on 4.7.x) into a folder called local_fix_user_table, and add it to the place you put new modules (in 4.7.x, probably your $DRUPALROOT/modules folder, in 5.x, probably $DRUPALROOT/sites/default/modules or $DRUPALROOT/sites/all/modules).

Then enable the module, and it should run the query every time cron is called.

WARNING: I haven't tested this, I haven't even made sure I've got the syntax correct — you may need to play around a bit to fix any typos I've made.

HTH,
Ricky

(btw: I closed this because this isn't really a problem with site_user_list)