• Hello, I’m having a problem updating statuses of newly registered users. Previously I’d used ‘um_registration_complete‘ hook to manullay set status ‘rejected‘ for users who fell under certain conditions. It worked until early october, when I think the plugin was updated and something has changed in its logic.
    I used ‘um_after_user_status_is_changed‘ for debugging and found out that the ‘um_registration_complete‘ hook is still working fine, but after that something changes the status to ‘awaiting_email_confirmation‘ (which is the default status for newly registered). For instance, a couple of log entries:

    07-11-24 15:36:15 User 3684
    Old status:
    New status: rejected

    07-11-24 15:36:15 User 3684
    Old status: rejected
    New status: awaiting_email_confirmation
    07-11-24 16:10:21 User 3687
    Old status:
    New status: inactive

    07-11-24 16:10:21 User 3687
    Old status: inactive
    New status: awaiting_email_confirmation

    Could you tell me what exactly has changed here and how can I make it work again?

Viewing 4 replies - 1 through 4 (of 4 total)
  • missveronica

    (@missveronicatv)

    @sunofjuche

    Read about “Deprecated” in the UM 2.8.7 release notes

    https://github.com/ultimatemember/ultimatemember/releases/tag/2.8.7

    • This reply was modified 2 weeks, 4 days ago by missveronica.
    Thread Starter sunofjuche

    (@sunofjuche)

    I’ve read all these notes and already tried replacing the deprecated function

    UM()->user()->set_status( 'rejected' );

    with the new one

    UM()->common()->users()->set_status( $user_id, 'rejected' );

    but to no avail. (Also, there seems to be an error in the notes, particularly in the order of parameters in set_status, which is actually ( $user_id, $status ) in the source code of the plugin)

    Anyway, I suppose the problem isn’t in the deprecated function, but the fact that there’s something new in the whole registration handling process that causes the status to be changed after the ‘um_registration_complete‘ hook is fired

    • This reply was modified 2 weeks, 3 days ago by sunofjuche.
    missveronica

    (@missveronicatv)

    @sunofjuche

    What priority are you using for the um_registration_complete hook?
    Try to use 99 to execute by the last before redirect.

    Thread Starter sunofjuche

    (@sunofjuche)

    Just tried 99, but alas, nothing changed

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.