src/User/User.php
public static function search(Userinfo $userinfo, $lookup = false)
	{
		$exsistingUser = null;

		if ($lookup && $userinfo->getJname() !== null) {
			$userPlugin = Factory::getUser($userinfo->getJname());

			$exsistingUser = $userPlugin->lookupUser($userinfo);
		}
		if (!$exsistingUser instanceof Userinfo) {
			$plugins = Factory::getPlugins();
			foreach ($plugins as $plugin) {
				try {
					$JFusionSlave = Factory::getUser($plugin->name);

					$exsistingUser = $JFusionSlave->getUser($userinfo);
					if ($exsistingUser instanceof Userinfo) {
						break;
					}
				} catch (Exception $e) {
				}
			}
		}
		return $exsistingUser;
	}
public static function search(Userinfo $userinfo, $lookup = false)
	{
		$exsistingUser = null;

		if ($lookup && $userinfo->getJname() !== null) {
			$userPlugin = Factory::getUser($userinfo->getJname());

			$exsistingUser = $userPlugin->lookupUser($userinfo);
		}
		if (!$exsistingUser instanceof Userinfo) {
			$plugins = Factory::getPlugins();
			foreach ($plugins as $plugin) {
				try {
					$JFusionSlave = Factory::getUser($plugin->name);

					$exsistingUser = $JFusionSlave->getUser($userinfo);
					if ($exsistingUser instanceof Userinfo) {
						break;
					}
				} catch (Exception $e) {
				}
			}
		}
		return $exsistingUser;
	}
public static function search ( Userinfo $ userinfo , $ lookup = false ) { $ exsistingUser = null ; if ( $ lookup && $ userinfo -> getJname ( ) !== null ) { $ userPlugin = Factory :: getUser ( $ userinfo -> getJname ( ) ) ; $ exsistingUser = $ userPlugin -> lookupUser ( $ userinfo ) ; } if ( ! $ exsistingUser instanceof Userinfo ) { $ plugins = Factory :: getPlugins ( ) ; foreach ( $ plugins as $ plugin ) { try { $ JFusionSlave = Factory :: getUser ( $ plugin -> name ) ; $ exsistingUser = $ JFusionSlave -> getUser ( $ userinfo ) ; if ( $ exsistingUser instanceof Userinfo ) { break ; } } catch ( Exception $ e ) { } } } return $ exsistingUser ; }
Finds the first user that match starting with master

@param Userinfo $userinfo
@param bool     $lookup

@return null|Userinfo returns first used founed
Finds the first user that match starting with master