Forum Replies Created

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter Clearmedia

    (@clearmedia)

    UPDATE:

    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!!!

    Thread Starter Clearmedia

    (@clearmedia)

    Hi 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:

    1. If the user has paid their invoice, it updates the user to “editor”
    2. 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”?

    Thread Starter Clearmedia

    (@clearmedia)

    Ok – cross your fingers! And thanks for the help – I’ll keep you posted (pardon the pun) ??

    Thread Starter Clearmedia

    (@clearmedia)

    Ahh ok – so I can simply replace update with insert and the function will update the user if already exists?

    Thread Starter Clearmedia

    (@clearmedia)

    Thanks 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

    Thread Starter Clearmedia

    (@clearmedia)

    Thanks 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 ??

    I 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 = On

    And edited wp-config to include:
    define(‘WP_MEMORY_LIMIT’, ‘100M’);

    PHP config through cpanel shows:
    memory_limit = 32M
    upload_max_filesize = 20M

    But to no avail!

    Please can someone advise why this has all of a sudden become an issue??

Viewing 7 replies - 16 through 22 (of 22 total)