5.x-1.x-dev 12 June. User with no personal album creates new album (Title only, no parent option available, published).
The album is created, but new dictionary term is created under "Albums/Acidfree albums" (not under Albums/ as with 23 May dev version). Therefore the new album is not listed in acidfree/per-user-albums along with existing user albums.

Comments

skizzo’s picture

Category: bug » support

update: previous description is incomplete and may be misleading. Tested again starting from scratch:
- deleted all user relate albums
- user creates first album (Title "my first album", no parent option available, published)
- as Admin I now see 2 albums:
- 1) in .../acidfree/per-user-albums: Title "Username's album"
- 2) in .../acidfree: Title "my first album"

Is this the intended behaviour?
If I add picture to 2) they will be not reachable through .../acidfree/per-user-albums

skizzo’s picture

Category: support » bug

By trial and error I realized that the correct sequence is:
- user simply visits ../user/acidfree ("Username's album" is automatically created)
- users visits add/acidfree (and creates "my first album", which is then correctly inserted in above album)

However nothing prevents the user from taking the approach described in my previous message,
wich would result in inconsistent albums configuration.

skizzo’s picture

Status: Active » Closed (fixed)
greg.harvey’s picture

Status: Closed (fixed) » Active

Hi Skizzo,

We get around this by creating the album when the user first logs in using hook_user() ...

/**
 * Implementation of hook_user
 */
function whattalent_alpha_user($op, &$edit, &$account, $category = NULL) {
  switch ($op) {
    case 'insert': //new user registered
      acidfree_get_root($account->uid, true);
      break;
  }
}

Thought this might be of interest. Here's my opinion of what future versions of Acidfree should do:

* use the "login" op of hook_user
* on login, check the user's roles for per-user album permissions
* if any of the user's roles allow them a per-user album, check one exists for that user
* if not, create one

Optionally, you could also delete an album if the user no longer has per-user album permissions. Point is, now your per-user albums would be updated on each user login, so you will never have the case where a user does not have an album but tries to add an Image again. =)

If I get to this before anyone else does, I'll write a patch and post it here.

greg.harvey’s picture

Status: Active » Closed (fixed)

Actually, this is pretty much covered here, and more besides:
http://drupal.org/node/144636

Excellent thread! =)