How to prevent a user from updating other users in WordPress?

I’ve implemented my “dirty” solution as follows. If there is an better or cleaner approach, feel free to provide an answer: function stop_access_profile() { global $pagenow; if ($pagenow != ‘user-edit.php’) { return; } $user_id = get_current_user_id(); $profile_id = intval($_GET[‘user_id’]); // Some logic implementation to decide whether the current user can see the current profile // … Read more

When using https, WordPress doesn’t use https for CSS and JavaScript, and admin doesn’t work. How do I fix this?

Check two things: in the wp-options table, the site URLs (in two places) should be the full URL, as in https://www.example.com . check the site’s htaccess file for proper rewrite of http to https. For a htaccess rule, this one works in most case: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Then look … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)