← Back to team overview

mahara-contributors team mailing list archive

[Bug 1367939] Re: Error on registration if confirmed registration is turned on and copy collection in play

 

Hi,

I couldn't replicate this bug. It worked perfectly when I tried.

The steps I tried were:

-Log in as admin
-Click Administration
-Institutions
-Add institution
-Added "test" institution
-Checked Registration Allowed
-Checked Confim Registration
-Submit
-Pages
-Create a page
-Filled in default fields with "test"
-Save
-Done
-Collections
-Add one
-Typed in name and description with "test"
-Next: Edit collection pages
-Checked the boxes of pages to add
-Add pages
-Done
-Home logo
-Administration
-Institutions
-Share
-Edit acces (key img)
-Advanced options drop down 
-Check Allow copying
-OK
-Logout
-Register
-Entered first and last name and email
-Set institution to "my test one"
-Typed anything in registration reason
-Register
-Checked emails and clicked link in emails
-Sign in as Admin
-Click Approve
-Go back to emails and click the new link
-Brought up password change form, so changed password
-Click Submit
-Password saved successfully


Thanks,
Jinelle

-- 
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