User registration throws errors

Bug #1431594 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Son Nguyen

Bug Description

Master 15.04

Initial assessment from Robert:
the problem is in lib/user.php function display_username(). somehow a $user variable is passed in that is missing $user->username. so I suspect that the $user variable is not a true $user object.

---------

Test scenario:

1. Set up a new institution and enable registration and "Confirm registration".
2. Register as new user and you'll get the error message below.

[WAR] 42 (lib/user.php:1196) Undefined property: stdClass::$username
Call stack (most recent first):

    log_message("Undefined property: stdClass::$username", 8, true, true, "/home/kristina/code/mahara/htdocs/lib/user.php", 1196) at /home/kristina/code/mahara/htdocs/lib/errors.php:441
    error(8, "Undefined property: stdClass::$username", "/home/kristina/code/mahara/htdocs/lib/user.php", 1196, array(size 2)) at /home/kristina/code/mahara/htdocs/lib/user.php:1196
    display_username(object(stdClass)) at /home/kristina/code/mahara/htdocs/lib/user.php:1042
    display_name(object(stdClass), object(stdClass)) at /home/kristina/code/mahara/htdocs/lib/user.php:731
    email_user(object(stdClass), null, "Request for registration at Mahara received", "Hi test, Thank you for requesting an account on M...", "<p>Hi test,</p> <p>Thank you for requesting an acc...") at /home/kristina/code/mahara/htdocs/auth/lib.php:2457
    auth_register_submit(object(Pieform), array(size 10)) at Unknown:0
    call_user_func_array("auth_register_submit", array(size 2)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:532
    Pieform->__construct(array(size 11)) at /home/kristina/code/mahara/htdocs/auth/lib.php:2228
    auth_generate_registration_form_js(array(size 11), array(size 1)) at /home/kristina/code/mahara/htdocs/register.php:204

Tags: regression
Revision history for this message
Son Nguyen (ngson2000) wrote :

This is caused by the patch https://reviews.mahara.org/3581

Changed in mahara:
assignee: nobody → Son Nguyen (ngson2000)
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/4400

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.