Clearmedia
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: wp_update_user not updatingUPDATE:
This is the offending code:
$uID = MY USER'S ID $result = wp_insert_user(array('ID'=>$uID,'role'=>'editor')); if(is_wp_error($result)) { echo $result->get_error_message(); }
This is returning “Cannot create a user with an empty login name” WP_error
As you can imagine – this is really bugging me – it’s the last piece of the puzzle!!!
Forum: Fixing WordPress
In reply to: wp_update_user not updatingHi Wil – thanks for the response
I am actually updating a user’s credentials – not inserting a new user.
I have written a plugin that creates a new user as a “subscriber”
I have a cron job that runs a script every morning that:- If the user has paid their invoice, it updates the user to “editor”
- Checks for unpaid invoices and if the due date is past todays date it updates the user to “subscriber” if they are an “editor”
The problem is:
When the user is updated to “editor”, they are still unable to access the menu items I have enabled for “editor” – unless I go into that user in the admin and click “save”?
Forum: Fixing WordPress
In reply to: wp_update_user not updatingOk – cross your fingers! And thanks for the help – I’ll keep you posted (pardon the pun) ??
Forum: Fixing WordPress
In reply to: wp_update_user not updatingAhh ok – so I can simply replace update with insert and the function will update the user if already exists?
Forum: Fixing WordPress
In reply to: wp_update_user not updatingThanks for the repsonse Alex – unfortunately no, I used wp_update_user()
Its quite strange – the update user seems to work but the user is unable to access according to their new permissions unless I go into the user in the admin and click save…? odd
Forum: Fixing WordPress
In reply to: Exhausted memory after upgrading to 3.4Thanks for the quick response deepbevel. I have a sneaking suspicion you are onto something with the hosting services – the method I followed above works on other sites but not with this host. All plugins have been dis/re-enable and are working fine. I am about to get on the phone with the host – will keep you posted ??
Forum: Fixing WordPress
In reply to: Fatal error in media.php when uploading imageI have this exact problem – only happened since upgrade to 3.4. The image actually upload to the media library but memory gets exhausted while try to crunch.
I have edited php.ini to:
memory_limit = 100M
upload_max_filesize = 100M
post_max_size = 100M
file_uploads = OnAnd edited wp-config to include:
define(‘WP_MEMORY_LIMIT’, ‘100M’);PHP config through cpanel shows:
memory_limit = 32M
upload_max_filesize = 20MBut to no avail!
Please can someone advise why this has all of a sudden become an issue??