update_user_meta not updating

In response to the extended question, i.e. Another question is[…]: It is worth noting that WordPress’ plugin API does not persist between requests – that is to say, any functions associated with actions through WordPress’ add_action() are only associated for the duration of the script’s execution. Each subsequent request served by WordPress must once again … Read more

Create Unique ID for user

Here is some code that reads the highest number from the user meta table and then adds +1 to that number. This saves that number for each newly registered user. The code is triggered via the action hook “user_register”. add_action( ‘user_register’, ‘assignuserid’); function assignuserid($user_id) { global $wpdb; $latestid=$wpdb->get_var(“SELECT meta_value from $wpdb->usermeta where meta_key=’memnumber’ order by … Read more

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