Commit 1dffbae2 authored by Petr Skoda's avatar Petr Skoda
Browse files

MDL-24321 switching to stdClass in /auth/

parent 365a5941
......@@ -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;
}
......
......@@ -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);
......
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment