MDL-24321 switching to stdClass in /auth/
authorPetr Skoda <skodak@moodle.org>
Tue, 21 Sep 2010 08:09:22 +0000 (08:09 +0000)
committerPetr Skoda <skodak@moodle.org>
Tue, 21 Sep 2010 08:09:22 +0000 (08:09 +0000)
auth/db/auth.php
auth/ldap/auth.php
auth/mnet/auth.php

index 8bd50da..fa689c5 100644 (file)
@@ -260,7 +260,7 @@ class auth_plugin_db extends auth_plugin_base {
                             echo "\t"; print_string('auth_dbdeleteusererror', 'auth_db', $user->username); echo "\n";
                         }
                     } else if ($this->config->removeuser == AUTH_REMOVEUSER_SUSPEND) {
-                        $updateuser = new object();
+                        $updateuser = new stdClass();
                         $updateuser->id   = $user->id;
                         $updateuser->auth = 'nologin';
                         $DB->update_record('user', $updateuser);
@@ -435,7 +435,7 @@ class auth_plugin_db extends auth_plugin_base {
      */
     function get_userinfo_asobj($username) {
         $user_array = truncate_userinfo($this->get_userinfo($username));
-        $user = new object();
+        $user = new stdClass();
         foreach($user_array as $key=>$value) {
             $user->{$key} = $value;
         }
index 0ef5c40..09220fc 100644 (file)
@@ -274,7 +274,7 @@ class auth_plugin_ldap extends auth_plugin_base {
             return false; //error or not found
         }
         $user_array = truncate_userinfo($user_array);
-        $user = new object();
+        $user = new stdClass();
         foreach ($user_array as $key=>$value) {
             $user->{$key} = $value;
         }
@@ -708,7 +708,7 @@ class auth_plugin_ldap extends auth_plugin_base {
                             echo "\t"; print_string('auth_dbdeleteusererror', 'auth_db', $user->username); echo "\n";
                         }
                     } else if ($this->config->removeuser == AUTH_REMOVEUSER_SUSPEND) {
-                        $updateuser = new object();
+                        $updateuser = new stdClass();
                         $updateuser->id = $user->id;
                         $updateuser->auth = 'nologin';
                         $DB->update_record('user', $updateuser);
@@ -733,7 +733,7 @@ class auth_plugin_ldap extends auth_plugin_base {
                 print_string('userentriestorevive', 'auth_ldap', count($revive_users));
 
                 foreach ($revive_users as $user) {
-                    $updateuser = new object();
+                    $updateuser = new stdClass();
                     $updateuser->id = $user->id;
                     $updateuser->auth = $this->authtype;
                     $DB->update_record('user', $updateuser);
index 09fb241..2faf62d 100644 (file)
@@ -158,7 +158,7 @@ class auth_plugin_mnet extends auth_plugin_base {
                                    array('userid'=>$USER->id, 'mnethostid'=>$mnethostid,
                                    'useragent'=>sha1($_SERVER['HTTP_USER_AGENT'])));
         if ($mnet_session == false) {
-            $mnet_session = new object();
+            $mnet_session = new stdClass();
             $mnet_session->mnethostid = $mnethostid;
             $mnet_session->userid = $USER->id;
             $mnet_session->username = $USER->username;
@@ -422,7 +422,7 @@ class auth_plugin_mnet extends auth_plugin_base {
         if (!$mnet_session = $DB->get_record('mnet_session',
                                    array('userid'=>$user->id, 'mnethostid'=>$remotepeer->id,
                                    'useragent'=>sha1($_SERVER['HTTP_USER_AGENT'])))) {
-            $mnet_session = new object();
+            $mnet_session = new stdClass();
             $mnet_session->mnethostid = $remotepeer->id;
             $mnet_session->userid = $user->id;
             $mnet_session->username = $user->username;