Fix Login form preview in the Form Builder

This commit is contained in:
Champ Camba
2019-11-28 18:01:29 +08:00
parent fc7d174c9b
commit e9ef108e42
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
* @return array
*/
function display_logout_form( $args ) {
if ( is_user_logged_in() && isset( $args['mode'] ) && $args['mode'] == 'login' ) {
if ( is_user_logged_in() && isset( $args['mode'] ) && $args['mode'] == 'login' && ! is_admin() ) {
if ( get_current_user_id() != um_user( 'ID' ) ) {
um_fetch_user( get_current_user_id() );