is wordpress stores Role Id in WP database?

The “ID” of the role is the array key in wp_user_roles. The value of wp_user_roles looks like this: Array ( [administrator] => Array ( [name] => Administrator [capabilities] => Array ) => Array ( [name] => Author [capabilities] => Array ) ) In that example, administrator and author are the closest thing there is to … Read more

Convert user passwords to MD5?

It is possible to write code to grab the user’s password on login and write it out in a different format to a different location. Over time, you would thus accumulate the passwords in a different format than WordPress itself uses (it makes use of the excellent PHPass library for password storage). To do this, … Read more

WordPress : Explain Plugins & Theme string value in database

The value is a serialized php array. Further explanation is not really WordPress specific, but here you go — the ‘s’ is the length of the string representation of the succeeding array element (the length of the string in quotes). I.E. in a:2:{s:12:”twentyeleven”;s:7:”/themes”;s:9:”twentyten”;s:7:”/themes”;} the “12” in s:12 represents the length of twentyeleven.

$wpdb->insert Giving duplicates

There is nothing that prevent duplicates here. When you create the table ‘church’ is a good idea set a UNIQUE sql index for field email, in this way you can rely on email address to preventing duplicate entries. As a generic PHP good practice, you should check the existence of a a variable before using … Read more