Skip to content

Commit

Permalink
MDL-12858 fix print_error() usage.
Browse files Browse the repository at this point in the history
print_error()'s third parameter is the URL we jump to (defaults to
$CFG->wwwroot if not set) when we click the 'Continue' button, not the message
string parameter object.

Forward ported from MOODLE_18_STABLE
  • Loading branch information
iarenaza committed Jan 8, 2008
1 parent 3a0dd57 commit 066de33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions auth/ldap/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function user_login($username, $password) {
}
else {
@ldap_close($ldapconnection);
print_error('auth_ldap_noconnect','auth',$this->config->host_url);
print_error('auth_ldap_noconnect','auth','',$this->config->host_url);
}
return false;
}
Expand Down Expand Up @@ -859,7 +859,7 @@ function update_user_record($username, $updatekeys = false) {
$user = get_record('user', 'username', $username, 'mnethostid', $CFG->mnet_localhost_id);
if (empty($user)) { // trouble
error_log("Cannot update non-existent user: ".stripslashes($username));
print_error('auth_dbusernotexist','auth',$username);
print_error('auth_dbusernotexist','auth','',$username);
die;
}

Expand Down Expand Up @@ -1585,7 +1585,7 @@ function ldap_connect($binddn='',$bindpwd='') {
}

//If any of servers are alive we have already returned connection
print_error('auth_ldap_noconnect_all','auth',$this->config->user_type);
print_error('auth_ldap_noconnect_all','auth','', $debuginfo);
return false;
}

Expand Down

0 comments on commit 066de33

Please sign in to comment.