# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/lib/navigationlib.php
--- moodle/lib/navigationlib.php Base (1.204)
+++ moodle/lib/navigationlib.php Locally Modified (Based On 1.204)
@@ -3331,7 +3331,7 @@
             return true;
         }
 
-        // Add the profile edit link
+        // Add the profile edit and delete links
         if (isloggedin() && !isguestuser($user) && !is_mnet_remote_user($user)) {
             if (($currentuser || is_siteadmin($USER) || !is_siteadmin($user)) && has_capability('moodle/user:update', $systemcontext)) {
                 $url = new moodle_url('/user/editadvanced.php', array('id'=>$user->id, 'course'=>$course->id));
@@ -3350,9 +3350,10 @@
             }
         }
 
-        // Change password link
         if (!empty($user->auth)) {
             $userauth = get_auth_plugin($user->auth);
+            
+            // Change password link
             if ($currentuser && !session_is_loggedinas() && $userauth->can_change_password() && !isguestuser() && has_capability('moodle/user:changeownpassword', $systemcontext)) {
                 $passwordchangeurl = $userauth->change_password_url();
                 if (empty($passwordchangeurl)) {
@@ -3360,7 +3361,13 @@
                 }
                 $usersetting->add(get_string("changepassword"), $passwordchangeurl, self::TYPE_SETTING);
             }
+
+            // Check if the user is deletable.
+            if (!$currentuser && !is_siteadmin($user) && $userauth->allow_manual_user_deletion() && has_capability('moodle/user:delete', $systemcontext)) {
+                $url = new moodle_url('/admin/user.php', array('delete'=>$user->id, 'sesskey'=>sesskey()));
+                $usersetting->add(get_string('deleteuser','admin'), $url, self::TYPE_SETTING);
         }
+        }
 
         // View the roles settings
         if (has_any_capability(array('moodle/role:assign', 'moodle/role:safeoverride','moodle/role:override', 'moodle/role:manage'), $usercontext)) {
