Current user and auhor
-
Hi! I hope someone can give some help..
Sorry i can’t give the site address because it Is a security issue (template problem).
we need a control code to limit editing access for the author only to this page (it is a frontend page w/forms but connected to wordpress backend). Currently ANY author/registered user can modify the data, a big problem .the code I use:
<?phpglobal $current_user; get_currentuserinfo(); $user = $current_user->user_login; $email = $current_user->user_email; $name = $current_user->display_name; $idu = $current_user->ID; $ida = get_the_author_id(); ?> <?php if $idu != $ida { echo 'user not authorized'; } else { echo '': }?>
the code is not working..
any help please?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Current user and auhor’ is closed to new replies.