Title: Edit function for users
Last modified: August 22, 2016

---

# Edit function for users

 *  Resolved [alpha2](https://wordpress.org/support/users/neoseeyou/)
 * (@neoseeyou)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/)
 * Hello 😉
 * I have an issue, options are set to be able to deletes entries, but only admin
   can erase them (for everybody’s profile)
 * Is it possible for a user to delete only is own datas? actually user can’t erase
   nothing.
 * Thank you!
 * [https://wordpress.org/plugins/gravity-forms-sticky-list/](https://wordpress.org/plugins/gravity-forms-sticky-list/)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/edit-function-for-users/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/edit-function-for-users/page/2/?output_format=md)

 *  Plugin Author [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750334)
 * To make this clear. Do you mean that when a logged in user is viewing _his own_
   profile page he cannot delete the entries in the list?
 * Is the “delete” link displayed?
    What happens when the user clicks “delete”?
 *  Thread Starter [alpha2](https://wordpress.org/support/users/neoseeyou/)
 * (@neoseeyou)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750337)
 * Hello
 * Yes when the user is viewing his own profile , he is not able to see the delete
   button and so can’t delete any entry.
 * Only admin user can see the delete button
 *  Thread Starter [alpha2](https://wordpress.org/support/users/neoseeyou/)
 * (@neoseeyou)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750452)
 * last version didn’t solve the problem unfortunatly 🙁
 *  Plugin Author [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750465)
 * There is one line of code that controls the display of the “Delete” button on
   line 414:
 * `if($entry["created_by"] == $current_user->ID || current_user_can('delete_others_posts')){`
 * If the entry is created by the currently logged in user or if the user has ability
   to delete others posts (Admin and Editor user roles) it should display the button.
 * If you edit the plugins main file you could try to compare the ID uf the user
   with the currently logged in user.
 * Paste this code before line 414:
 *     ```
       var_dump($entry["created_by"]);
       var_dump($current_user->ID);
       ```
   
 * Log in as the user and go to the profile page and tell me that it says.
 *  Thread Starter [alpha2](https://wordpress.org/support/users/neoseeyou/)
 * (@neoseeyou)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750466)
 * Thank you for your answer, i checked sticky-list.php and
 * if($entry[“created_by”] == $current_user->ID || current_user_can(‘delete_others_posts’))
 * is line 398
 * i add your code before if($enable_delete) line 395
 * When i visit as the user i have this code :
 * string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(
   1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1)“
   2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2”
   NULL
 *  Plugin Author [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750503)
 * Great. Then we have the problem pinpointed. The variable that is NULL is supposed
   to hold the currently logged in users ID.
 * It seems that buddypress does not use the same method for getting the currently
   logged in user as standard WordPress does.
 * I will publish a fix within a couple of days.
 *  Thread Starter [alpha2](https://wordpress.org/support/users/neoseeyou/)
 * (@neoseeyou)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750504)
 * Thank you! yes i guess this particular problem is due to buddypress
 *  Thread Starter [alpha2](https://wordpress.org/support/users/neoseeyou/)
 * (@neoseeyou)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750511)
 * is 1.1.6 suppose to solve this issue?
 * Thank you
 *  Plugin Author [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750514)
 * No. A fix will be released and a new version will uploaded soon.
 *  Plugin Author [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750542)
 * I have (hopefully) fixed this issue in the latest release (1.1.7). Grab it and
   see if it solves your issue.
 *  Thread Starter [alpha2](https://wordpress.org/support/users/neoseeyou/)
 * (@neoseeyou)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750545)
 * Hello
 * Unfortunatly no 🙁 i don’t know why and now i have double “sticky list” option
   in the form settings menu.
 * See attach
 * Thank you
 *  Plugin Author [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750547)
 * I have fixed the double “sticky list” option bug, thanks for reporting.
 * I have also updated the plugin to use a better way of getting the currently logged
   in user that hopefully plays nice with BuddyPress.
 * Grab the new version (1.2) and see if that solves your issues.
 *  Plugin Author [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750548)
 * …
 *  Thread Starter [alpha2](https://wordpress.org/support/users/neoseeyou/)
 * (@neoseeyou)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750549)
 * Hello! really a great thank you what you do, it solve both issues. Perfect support
   as always.
 *  Plugin Author [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/#post-5750550)
 * Thanks! I’ll mark this topic as resolved then. Feel free to open a new one if
   you need 🙂

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/edit-function-for-users/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/edit-function-for-users/page/2/?output_format=md)

The topic ‘Edit function for users’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gravity-forms-sticky-list_9b65b3.
   svg)
 * [Gravity Forms Sticky List](https://wordpress.org/plugins/gravity-forms-sticky-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-sticky-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-sticky-list/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-sticky-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-sticky-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-sticky-list/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/edit-function-for-users/page/2/#post-5750570)
 * Status: resolved