Skip to content

Commit

Permalink
MDL-14679
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed May 31, 2008
1 parent b3829d0 commit ab122f4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions auth/none/auth.php
Expand Up @@ -52,8 +52,8 @@ function user_login ($username, $password) {
*
* called when the user password is updated.
*
* @param object $user User table object (with system magic quotes)
* @param string $newpassword Plaintext password (with system magic quotes)
* @param object $user User table object
* @param string $newpassword Plaintext password
* @return boolean result
*
*/
Expand Down
2 changes: 1 addition & 1 deletion iplookup/index.php
Expand Up @@ -52,7 +52,7 @@
}

if ($user) {
if ($user = get_record('user', 'id', $user, 'deleted', 0)) {
if ($user = $DB->get_record('user', array('id'=>$user, 'deleted'=>0))) {
$info[] = fullname($user);
}
}
Expand Down
8 changes: 4 additions & 4 deletions login/change_password.php
Expand Up @@ -12,7 +12,7 @@

$systemcontext = get_context_instance(CONTEXT_SYSTEM);

if (!$course = get_record('course', 'id', $id)) {
if (!$course = $DB->get_record('course', array('id'=>$id))) {
print_error('No such course!');
}

Expand All @@ -36,7 +36,7 @@

if (is_mnet_remote_user($USER)) {
$message = get_string('usercannotchangepassword', 'mnet');
if ($idprovider = get_record('mnet_host', 'id', $USER->mnethostid)) {
if ($idprovider = $DB->get_record('mnet_host', array('id'=>$USER->mnethostid))) {
$message .= get_string('userchangepasswordlink', 'mnet', $idprovider);
}
print_error($message);
Expand All @@ -62,9 +62,9 @@

if ($mform->is_cancelled()) {
redirect($CFG->wwwroot.'/user/view.php?id='.$USER->id.'&course='.$course->id);
} else if ($data = $mform->get_data()) {
} else if ($data = $mform->get_data(false)) {

if (!$userauth->user_update_password(addslashes_recursive($USER), $data->newpassword1)) {
if (!$userauth->user_update_password($USER, $data->newpassword1)) {
print_error('errorpasswordupdate', 'auth');
}

Expand Down
4 changes: 2 additions & 2 deletions login/mnet_email.php
Expand Up @@ -15,8 +15,8 @@
print_header('MNET ID Provider', 'MNET ID Provider', $navigation, 'form.email' );

if ($form = data_submitted() and confirm_sesskey()) {
if ($user = get_record('user', 'username', $username, 'email', $form->email)) {
if (!empty($user->mnethostid) and $host = get_record('mnet_host', 'id', $user->mnethostid)) {
if ($user = $DB->get_record('user', array('username'=>$username, 'email'=>$form->email))) {
if (!empty($user->mnethostid) and $host = $DB->get_record('mnet_host', array('id'=>$user->mnethostid))) {
notice("You should be able to login at your <a href=\"{$host->wwwroot}/login/\">{$host->name}</a> provider.");
}
}
Expand Down

0 comments on commit ab122f4

Please sign in to comment.