← Back to team overview

mahara-contributors team mailing list archive

[Bug 1367939] A change has been merged

 

Reviewed:  https://reviews.mahara.org/3702
Committed: http://gitorious.org/mahara/mahara/commit/3fdb6816585bd2159735e502fbbb2216a7498e77
Submitter: Son Nguyen (son.nguyen@xxxxxxxxxxxxxxx)
Branch:    1.8_STABLE

commit 3fdb6816585bd2159735e502fbbb2216a7498e77
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date:   Thu Sep 11 10:47:05 2014 +1200

Register confirm allow user to copy collection (Bug #1367939)

See bug for testing

Change-Id: Iddc02c10d163ad363b5c0acddd324393c8e00dbc
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1367939

Title:
  Error on registration if confirmed registration is turned on and copy
  collection in play

Status in Mahara ePortfolio:
  Fix Committed
Status in Mahara 1.7 series:
  In Progress
Status in Mahara 1.8 series:
  In Progress
Status in Mahara 1.9 series:
  Fix Committed

Bug description:
  If you have an institution with:
  - both "Registration allowed" and "Confirm registration" chosen in it's config.
  - a collection that has the  "Copy for new institution members" checked  (under Admin -> Institution -> Share -> [name of collection] -> Advanced options)

  When a new user registers the admin gets an email to approve them, and
  on approval, the new user gets an email to complete signup.

  When the user clicks the complete signup link we get an error like:

  [WAR] 5f (lib/view.php:503) View::_create: User 0 is not allowed to create a view for owner 13
  Call stack (most recent first):

      View::_create(array(size 5), 0) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/view.php:371
      View::create_from_template(array(size 5), "18", 0, false, true) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/collection.php:274
      Collection::create_from_template(array(size 1), "2", null, false, true) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/auth/user.php:1302
      User->copy_institution_views_collections_to_new_member("squid") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/institution.php:338
      Institution->addUserAsMember(object(User)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/auth/user.php:683
      User->join_institution("squid") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/register.php:150
      create_registered_user() at /home/robertl/htdocs/mahara-devel/mahara/htdocs/register.php:198

  The problem being the system doesn't 'know' who is the authority user
  giving permission for this new user to copy the collection and so
  tries to do it with guest user (userid = 0).

  We need to have a way of either working out who the authority user id
  would be - or ignore it in this particular case (if safe to do)

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1367939/+subscriptions


References