Backend\Modules\Blog\Actions\ImportWordpress::handleUser PHP Method

handleUser() private method

We'll try and match the original user with a fork user. If we find no matches, we'll assign to the main fork user.
private handleUser ( string $username = '' ) : integer
$username string The original user name
return integer
    private function handleUser($username = '')
    {
        // Does someone with this username exist?
        /* @var \SpoonDatabase $db */
        $db = BackendModel::getContainer()->get('database');
        $id = (int) $db->getVar('SELECT id FROM users WHERE email=? AND active=? AND deleted=?', array(mb_strtolower($this->authors[(string) $username]['email']), 'Y', 'N'));
        // We found an id!
        if ($id > 0) {
            return $id;
        }
        // Assign to main user
        return 1;
    }