一般來說,
應該都是能改自己的密碼的,
但如果是使用LDAP或POP3來做認證,
那...
這就是多餘了,
而且事實上也不能修改...
因此,為了避免有同學或教師將此"修改密碼"當作可使用的,
不如把它給藏起來吧...
到/moodle/user中,找到view.php
並找到...
// Print other functions
echo '<div class="buttons"><table align="center"><tr>';
if ($currentuser and !isguest()) {
if ($internalpassword ) {
echo "<td nowrap=\"nowrap\"><form action=\"$internalpassword\" method=\"get\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
echo "</form></td>";
} else if ( strlen($CFG->{'auth_'.$user->auth.'_changepasswordurl'}) > 1 ) {
echo "<td nowrap=\"nowrap\"><form action=\"".$CFG->{'auth_'.$user->auth.'_changepasswordurl'}."\" method=\"get\">";
echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
echo "</form></td>";
}
}
除了// Print other functions以外,
全部註解起來,
這樣就行囉...
沒有留言:
張貼留言