Error when viewing a profile page with wall post as an Institution admin

Bug #1767220 reported by Cecilia Vela Gurovic on 2018-04-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Cecilia Vela Gurovic
17.04
High
Unassigned
17.10
High
Unassigned
18.04
High
Unassigned
18.10
High
Cecilia Vela Gurovic

Bug Description

To replicate

Have a User1 belong to an Institution
Go to profile page of the user and post a message in the wall
Have User2 and set it as admin of the Institution
Login as User2 and go to User1 profile page

Expected result: You can see the User1's profile page

Actual result: The error message is displayed

[WAR] cf (auth/user.php:846) Invalid argument pass to is_admin_for_user method
Call stack (most recent first):

    User->is_admin_for_user(" . intval($owner) .") at /home/ceciliavg/maharacode/mahara/htdocs/blocktype/wall/lib.php:324
    PluginBlocktypeWall::can_delete_wallpost("3", " . intval($owner) .") at /home/ceciliavg/maharacode/mahara/htdocs/blocktype/wall/lib.php:295
    PluginBlocktypeWall::{closure}(object(stdClass)) at Unknown:0
    array_map(object(Closure), array(size 3)) at /home/ceciliavg/maharacode/mahara/htdocs/blocktype/wall/lib.php:297
    PluginBlocktypeWall::fetch_posts(object(BlockInstance)) at /home/ceciliavg/maharacode/mahara/htdocs/blocktype/wall/lib.php:58
    PluginBlocktypeWall::render_instance(object(BlockInstance)) at /home/ceciliavg/maharacode/mahara/htdocs/lib/mahara.php:1809
    call_static_method("PluginBlocktypeWall", "render_instance", object(BlockInstance)) at /home/ceciliavg/maharacode/mahara/htdocs/blocktype/lib.php:1041
    BlockInstance->render_viewing(false) at /home/ceciliavg/maharacode/mahara/htdocs/lib/view.php:2133
    View->build_column(1, 2, false, false) at /home/ceciliavg/maharacode/mahara/htdocs/lib/view.php:2087
    View->build_columns(1, false, false) at /home/ceciliavg/maharacode/mahara/htdocs/lib/view.php:2072
    View->build_rows() at /home/ceciliavg/maharacode/mahara/htdocs/user/view.php:93

Changed in mahara:
importance: Undecided → High
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
Changed in mahara:
status: New → In Progress
no longer affects: mahara/trunk
Mahara Bot (dev-mahara) wrote :

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

Reviewed: https://reviews.mahara.org/8814
Committed: https://git.mahara.org/mahara/mahara/commit/7f45661d447e997a8d61bf97dc42e641f7fecbf6
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 7f45661d447e997a8d61bf97dc42e641f7fecbf6
Author: Cecilia Vela Gurovic <email address hidden>
Date: Fri Apr 27 11:33:33 2018 +1200

Bug 1767220: fixed can_delete_wallpost parameter

When changing the code to create a anonymous function
the parameter for the can_delete_wallpost function
was wrongly left as the name of a variable inside a string
instead of the actual variable

behatnotneeded

Change-Id: I53d6f2154cce910efa655d8d244b3c56d9f9b990

Mahara Bot (dev-mahara) wrote :

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/8820

Mahara Bot (dev-mahara) wrote :

Patch for "18.04_STABLE" branch: https://reviews.mahara.org/8821

Reviewed: https://reviews.mahara.org/8819
Committed: https://git.mahara.org/mahara/mahara/commit/7749c56167616c1d47019bfc7f3ca8c2c6860c8f
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit 7749c56167616c1d47019bfc7f3ca8c2c6860c8f
Author: Cecilia Vela Gurovic <email address hidden>
Date: Fri Apr 27 11:33:33 2018 +1200

Bug 1767220: fixed can_delete_wallpost parameter

When changing the code to create a anonymous function
the parameter for the can_delete_wallpost function
was wrongly left as the name of a variable inside a string
instead of the actual variable

behatnotneeded

Change-Id: I53d6f2154cce910efa655d8d244b3c56d9f9b990
(cherry picked from commit 7f45661d447e997a8d61bf97dc42e641f7fecbf6)

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8821
Committed: https://git.mahara.org/mahara/mahara/commit/6ecdc77c730264f22a858eae0e19af143d62143d
Submitter: Robert Lyon (<email address hidden>)
Branch: 18.04_STABLE

commit 6ecdc77c730264f22a858eae0e19af143d62143d
Author: Cecilia Vela Gurovic <email address hidden>
Date: Fri Apr 27 11:33:33 2018 +1200

Bug 1767220: fixed can_delete_wallpost parameter

When changing the code to create a anonymous function
the parameter for the can_delete_wallpost function
was wrongly left as the name of a variable inside a string
instead of the actual variable

behatnotneeded

Change-Id: I53d6f2154cce910efa655d8d244b3c56d9f9b990
(cherry picked from commit 7f45661d447e997a8d61bf97dc42e641f7fecbf6)

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8820
Committed: https://git.mahara.org/mahara/mahara/commit/db9c6f5ebd550e32cbf05524984081761cf12932
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit db9c6f5ebd550e32cbf05524984081761cf12932
Author: Cecilia Vela Gurovic <email address hidden>
Date: Fri Apr 27 11:33:33 2018 +1200

Bug 1767220: fixed can_delete_wallpost parameter

When changing the code to create a anonymous function
the parameter for the can_delete_wallpost function
was wrongly left as the name of a variable inside a string
instead of the actual variable

behatnotneeded

Change-Id: I53d6f2154cce910efa655d8d244b3c56d9f9b990
(cherry picked from commit 7f45661d447e997a8d61bf97dc42e641f7fecbf6)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers