• Resolved therealgilles

    (@chamois_blanc)


    Hello,

    I am wondering if it is necessary or a good idea to have the token expiration user meta based on the user ID. It creates a specific entry per user and therefore you end up with a lot of columns if you export the users as a csv file, and also a lot of column options when adding a custom field with Admin Columns.

    It does not affect functionality at all but it seems like unnecessary complexity. I also do not think it helps make anything more secure.

    Please let me know the rationale behind the decision.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @chamois_blanc,

    Thank for reaching out to us.

    This is how the plugin works. This functionality is necessary and we do not plan on changing it in the near feature.

    Please let me know in case you have other questions.

    Have a great day!

    Kind regards,

    Thread Starter therealgilles

    (@chamois_blanc)

    Thank you for the reply @dariusraia. To be clear, I am not expecting you to change the code.

    This said, I’ve looked through the code and cannot see a justification for having the user ID in the user meta key name. The user meta is already user-specific so in my opinion, it is redundant. The only part where the user ID is necessary is in the login link, so that the user can be easily identified.

    The keys could be called ‘wpa_token’ and ‘wpa_token_expiration’ and it would work the same way.

    Thread Starter therealgilles

    (@chamois_blanc)

    On an unrelated note, the following function @return DocBlock statement is specified as bool / WP_Error when it should be string|WP_Error:

    /**
     * Checks to see if an account is valid. Either email or username
     *
     * @since v.1.0
     *
     * @return bool / WP_Error
     */
    function wpa_valid_account( $account ){

    and this one should probably be bool|WP_Error:

    /**
     * Sends an email with the unique login link.
     *
     * @since v.1.0
     *
     * @return bool / WP_Error
     */
    function wpa_send_link( $email_account = false, $nonce = false, $remember = false ){
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘User meta based on user ID’ is closed to new replies.