Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

NOBUG: improved check of user context existence

When importing users from backup, their CONTEXT_USER level context is
not created yet. Therefore, make_context_subobj() creates $user->context
object here with empty values. So we have to call full
get_context_instance() here to create the context.
  • Loading branch information...
commit c36671d72c68317f33f250ca919a978c71f8bf5b 1 parent c17e376
David Mudrák authored June 17, 2010

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  user/index.php
2  user/index.php
@@ -712,7 +712,7 @@ function checkchecked(form) {
712 712
                     }
713 713
                 }
714 714
 
715  
-                if (!isset($user->context)) {
  715
+                if (empty($user->context->id)) {
716 716
                     $usercontext = get_context_instance(CONTEXT_USER, $user->id);
717 717
                 } else {
718 718
                     $usercontext = $user->context;

0 notes on commit c36671d

Please sign in to comment.
Something went wrong with that request. Please try again.