Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
Like Tree1Likes
  • 1 Post By jhowel03

Thread: Please help im noob with an error

  1. #1
    Junior Member
    Join Date
    Aug 2016
    Posts
    11
    Member #
    55039
    Liked
    1 times

    Unhappy Please help im noob with an error

    its a wordpress theme call Superlist.. when someone tries to register and push send... they get this error instead of the site taking them to their profile page.. heres the weird part when I get this error and click the refresh button i get automatically logged into the account i was trying to set up.. WHY ME!! please help please and thank you...


    Code:
    
    do u know what this means
    
    Warning: Missing argument 2 for WPaaS\Log\Components\User::callback_wp_login() in /home/content/a2pnexwpnas02_data01/92/3515092/html/wp-content/mu-plugins/gd-system-plugin/includes/log/components/class-user.php on line206
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/content/a2pnexwpnas02_data01/92/3515092/html/wp-content/mu-plugins/gd-system-plugin/includes/log/components/class-user.php:206) in/home/content/a2pnexwpnas02_data01/92/3515092/html/wp-includes/pluggable.php on line 1174

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    This will be a hard one for us to answer, since we don't have access to all of your files. These are warnings (not fatal), which is why it "sort of" works when you click refresh. The first warning is the real one, the 2nd warning is because of the first warning, so you can ignore that one.

    So the focus of your problem is here: class-user.php on line206

    It seems like the function is expecting two variables and is only getting one of them. That's about as much as I can tell.

    You could try going back to the theme page (the author's page) where you got your theme, or where you got your plugins. See if they have a discussion or forum where you might get some answers.


  4. #3
    Junior Member
    Join Date
    Aug 2016
    Posts
    11
    Member #
    55039
    Liked
    1 times
    hmmm.... inside the theme to told it to go to the user profile page after registration,, let me see here... here is the class-user.php page code


    sorry it was really long thanks so much for your help..

    Code:
    <?php
    
    namespace WPaaS\Log\Components;
    
    use WPaaS\Log\Event;
    use WPaaS\Log\Timer;
    
    if ( ! defined( 'ABSPATH' ) ) {
    
    	exit;
    
    }
    
    final class User extends Component {
    
    	/**
    	 * A user being deleted.
    	 *
    	 * @var \WP_User
    	 */
    	private $deleted_user;
    
    	/**
    	 * Return an array of role lables for a user.
    	 *
    	 * @param  \WP_User|int $user
    	 *
    	 * @return array
    	 */
    	private function get_role_labels( $user ) {
    
    		$user = is_a( $user, 'WP_User' ) ? $user : ( is_numeric( $user ) ? get_user_by( 'ID', $user ) : false );
    
    		if ( ! $user ) {
    
    			return;
    
    		}
    
    		global $wp_roles;
    
    		$roles  = $wp_roles->get_names();
    		$labels = [];
    
    		foreach ( $roles as $role => $label ) {
    
    			if ( in_array( $role, (array) $user->roles, true ) ) {
    
    				$labels[] = translate_user_role( $label );
    
    			}
    
    		}
    
    		return $labels;
    
    	}
    
    	/**
    	 * Grab the object of a user being deleted.
    	 *
    	 * Before the user is deleted from the database we
    	 * must temporarily cache their WP_User object so we
    	 * can include that data the log.
    	 *
    	 * @action delete_user
    	 *
    	 * @param int $user_id
    	 */
    	public function callback_delete_user( $user_id ) {
    
    		if ( $user = get_user_by( 'ID', $user_id ) ) {
    
    			$this->deleted_user = $user;
    
    		}
    
    	}
    
    	/**
    	 * User > Delete
    	 *
    	 * @action deleted_user
    	 *
    	 * @param int $user_id
    	 */
    	public function callback_deleted_user( $user_id ) {
    
    		if ( empty( $this->deleted_user->ID ) || $this->deleted_user->ID !== $user_id ) {
    
    			return;
    
    		}
    
    		Timer::stop();
    
    		$this->log(
    			'delete',
    			_x(
    				'%1$s\'s user account deleted (%2$s)',
    				'1. User display name, 2. User role',
    				'gd-system-plugin'
    			),
    			[
    				'display_name'    => $this->deleted_user->display_name,
    				'role_labels'     => implode( ', ', $this->get_role_labels( $this->deleted_user ) ),
    				'user_id'         => $this->deleted_user->ID,
    				'user_login'      => $this->deleted_user->user_login,
    				'user_email'      => $this->deleted_user->user_email,
    				'user_registered' => Event::e_time( $this->deleted_user->user_registered ),
    			]
    		);
    
    		$this->deleted_user = null; // Empty the temp user object
    
    	}
    
    	/**
    	 * User > Update
    	 *
    	 * @action profile_update
    	 *
    	 * @param int      $user_id
    	 * @param \WP_User $user
    	 */
    	public function callback_profile_update( $user_id, $user ) {
    
    		if ( ! is_a( $user, 'WP_User' ) ) {
    
    			return;
    
    		}
    
    		Timer::stop();
    
    		$this->log(
    			'update',
    			_x(
    				"%s's user profile updated",
    				'User display name',
    				'gd-system-plugin'
    			),
    			[
    				'display_name'    => $user->display_name,
    				'role_labels'     => implode( ', ', $this->get_role_labels( $user ) ),
    				'user_id'         => $user->ID,
    				'user_login'      => $user->user_login,
    				'user_email'      => $user->user_email,
    				'user_registered' => Event::e_time( $user->user_registered ),
    			]
    		);
    
    	}
    
    	/**
    	 * User > Change Role
    	 *
    	 * @action set_user_role
    	 *
    	 * @param int    $user_id
    	 * @param string $new_role
    	 * @param array  $old_roles
    	 */
    	public function callback_set_user_role( $user_id, $new_role, $old_roles ) {
    
    		if ( ! $old_roles ) {
    
    			return;
    
    		}
    
    		global $wp_roles;
    
    		Timer::stop();
    
    		$user = get_user_by( 'ID', $user_id );
    
    		$this->log(
    			'update',
    			_x(
    				'%1$s\'s role changed from %2$s to %3$s',
    				'1: User display name, 2: Old role, 3: New role',
    				'gd-system-plugin'
    			),
    			[
    				'display_name'    => $user->display_name,
    				'old_role'        => translate_user_role( $wp_roles->role_names[ $old_roles[0] ] ),
    				'new_role'        => translate_user_role( $wp_roles->role_names[ $new_role ] ),
    				'user_id'         => $user->ID,
    				'user_login'      => $user->user_login,
    				'user_email'      => $user->user_email,
    				'user_registered' => Event::e_time( $user->user_registered ),
    			]
    		);
    
    	}
    
    	/**
    	 * User > Login
    	 *
    	 * @action wp_login
    	 *
    	 * @param string   $user_login
    	 * @param \WP_User $user
    	 */
    	public function callback_wp_login( $user_login, $user ) {
    
    		if ( ! is_a( $user, 'WP_User' ) ) {
    
    			return;
    
    		}
    
    		Timer::stop();
    
    		$this->log_metric( 'login', true, $user );
    
    		$this->log(
    			'login',
    			_x(
    				'%s logged in',
    				'User display name',
    				'gd-system-plugin'
    			),
    			[
    				'display_name' => $user->display_name,
    			],
    			$user
    		);
    
    	}
    
    	/**
    	 * User > Logout
    	 *
    	 * @action clear_auth_cookie
    	 */
    	public function callback_clear_auth_cookie() {
    
    		$user = wp_get_current_user();
    
    		// Ignore incognito mode trying to clear cookies on failed login attempts
    		if ( empty( $user ) || ! $user->exists() ) {
    
    			return;
    
    		}
    
    		Timer::stop();
    
    		$this->log(
    			'logout',
    			_x(
    				'%s logged out',
    				'User display name',
    				'gd-system-plugin'
    			),
    			[
    				'display_name' => $user->display_name,
    			],
    			$user
    		);
    
    	}
    
    	/**
    	 * User > Password Lost
    	 *
    	 * @action retrieve_password
    	 *
    	 * @param string $user_login
    	 */
    	public function callback_retrieve_password( $user_login ) {
    
    		$user = is_email( $user_login ) ? get_user_by( 'email', $user_login ) : get_user_by( 'login', $user_login );
    
    		if ( ! $user ) {
    
    			return;
    
    		}
    
    		Timer::stop();
    
    		$this->log(
    			'password_lost',
    			_x(
    				'%s requested a password reset',
    				'User display name',
    				'gd-system-plugin'
    			),
    			[
    				'display_name' => $user->display_name,
    			],
    			$user
    		);
    
    	}
    
    	/**
    	 * User > Password Reset
    	 *
    	 * @action password_reset
    	 *
    	 * @param \WP_User $user
    	 */
    	public function callback_password_reset( $user ) {
    
    		if ( ! is_a( $user, 'WP_User' ) ) {
    
    			return;
    
    		}
    
    		Timer::stop();
    
    		$this->log(
    			'password_reset',
    			_x(
    				"%s's password reset",
    				'User display name',
    				'gd-system-plugin'
    			),
    			[
    				'display_name'    => $user->display_name,
    				'user_id'         => $user->ID,
    				'user_login'      => $user->user_login,
    				'user_email'      => $user->user_email,
    				'user_registered' => Event::e_time( $user->user_registered ),
    			]
    		);
    
    	}
    
    }

  5. #4
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    You'll have to get with the plugin author on that one. Without access to everything, I have no way of really helping. It looks like $user should be an integer, but that integer isn't getting passed to the callback_wp_login() function like it is supposed to. It's probably attempting to pass it, but it's empty, and since the developer didn't test that in the code, you're just getting an error. Most likely, whatever function is responsible for declaring the value of that variable isn't. I would have to guess that the integer in question is likely the id of the user, but that's just a guess.

    I know none of that really helps, but it might help the plugin's developer if he's never seen the issue before.

    EDIT: 2 more things:
    1. Seems this plugin is written/installed by Go-Daddy. They're probably the ones who can fix it.
    2. Could have been an update to WP or the plugin that broke this somewhere along the way.
    Last edited by Ronald Roe; Aug 24th, 2016 at 08:03 PM.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  6. #5
    Junior Member
    Join Date
    Aug 2016
    Posts
    11
    Member #
    55039
    Liked
    1 times
    hey guys if i give you my login info do you think you could help... I called godaddy no help there..

  7. #6
    Junior Member
    Join Date
    Aug 2016
    Posts
    11
    Member #
    55039
    Liked
    1 times
    hey guys problem solved i had to ftp and disable the godaddy plugin like you said... Thanks so much.. you guys are awesooomeee..
    Ronald Roe likes this.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:44 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com