Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public registration verification link does not work #2358

Closed
steveooo9 opened this issue Jan 26, 2018 · 8 comments
Closed

Public registration verification link does not work #2358

steveooo9 opened this issue Jan 26, 2018 · 8 comments
Assignees

Comments

@steveooo9
Copy link

Description

When enabling public user registrations and using the default form from the craftcms.com docs,
a email get's send with this url: https://foobar.de/zkr-admin/actions/users/verifyemail?code=GhiOgRrqICJFM4VF63%7EllmmMO%7Ep%7EZ5nx&id=7a468332-12a5-402f-b6c5-77babc158480. But when opening this link, you get redirected to the login page of the backend and if you want to login, it says that the account isn't verified.

Funny thing: If you enter your username and click "forget password" and then you get a password reset link send that works and also with that, the account get's activated. So it seems that verifyemail Link somehow is buggy.

Additional info

  • Craft version: 2.6.3005
  • PHP version: 7.1
@angrybrad angrybrad self-assigned this Jan 26, 2018
@angrybrad
Copy link
Member

Can you share the contents of your craft/config/general.php file? You can redact out any sensitive bits of info you need to. Also, does the user that is clicking the link has "Access the Control Panel" permissions assigned to them?

@steveooo9
Copy link
Author

steveooo9 commented Jan 27, 2018

@angrybrad Here is a .env.php file:

<?php

if (isset($_SERVER['HTTPS']) && (strcasecmp($_SERVER['HTTPS'], 'on') === 0 || $_SERVER['HTTPS'] == 1)
  || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0) {
  $proto = 'https';
} else {
  $proto = 'http';
}
$siteUrl = $proto.'://'.$_SERVER['SERVER_NAME'].'/';
$baseUrl = $siteUrl;
$basePath = realpath(__DIR__).'/public/';

$vars = [
  'CRAFT_ENV' => 'local', // 'local' | 'stage' | 'live'
  'DB_HOST' => 'localhost',
  'DB_NAME' => 'scotchbox',
  'DB_USER' => 'root',
  'DB_PASSWORD' => 'root',
  'DB_PORT' => '3306',
  'SITE_URL' => $siteUrl,
  'BASE_URL' => $baseUrl,
  'BASE_PATH' => $basePath,
  // Optional
  'DEV_MODE' => true,
];

foreach ($vars as $key => $value) {
  putenv($key.'='.$value);
}

And here is the general.php:

<?php

/**
 * General Configuration
 *
 * All of your system's general configuration settings go in here.
 * You can see a list of the default settings in craft/app/etc/config/defaults/general.php
 */

$devMode = (getenv('DEV_MODE') !== false ? !!getenv('DEV_MODE') : false);

return [
  '*' => [
    'craftEnv' => CRAFT_ENVIRONMENT,
    'allowAutoUpdates' => false,
    'enableTemplateCaching' => true,
    'devMode' => $devMode,
    'cacheDuration' => 'P30M',
    'userSessionDuration' => 'PT2H',
    'timezone' => 'Europe/Berlin',
    'siteUrl' => [
      'de' => getenv('SITE_URL'),
      'en' => getenv('SITE_URL').'en/',
    ],
    'environmentVariables' => [
      'baseUrl' => getenv('BASE_URL'),
      'basePath' => getenv('BASE_PATH'),
    ],
    'langMap' => [
      'de' => 'de',
      'en' => 'en',
    ],
    'omitScriptNameInUrls' => true,
    'limitAutoSlugsToAscii' => true,
    'convertFilenamesToAscii' => true,
    'generateTransformsBeforePageLoad' => true,
    'pageTrigger' => 'seite-',
    'cpTrigger' => 'foobar-admin',
    'defaultCpLanguage' => 'de',
    'defaultSearchTermOptions' => [
      'subLeft' => true,
      'subRight' => true,
    ],
    'defaultWeekStartDay' => 1,
    'defaultImageQuality' => 90,
    'sendPoweredByHeader' => false,
  ],
  'local' => [
    'allowAutoUpdates' => true,
    'enableTemplateCaching' => false,
  ],
  'stage' => [],
  'live' => [],
];

Yes, this setting "Access the Control Panel" was assigned.

@angrybrad
Copy link
Member

Hrm... can you reproduce the issue with devMode enabled, then share your storage/logs/web.log file?

@steveooo9
Copy link
Author

@angrybrad I am using Craft 2. The log path you wrote isn't there..

@angrybrad
Copy link
Member

Sorry... it'll be craft/storage/runtime/logs/craft.log on Craft 2.

@steveooo9
Copy link
Author

steveooo9 commented Jan 30, 2018

@angrybrad
Copy link
Member

Hrm... I'm drawing a blank. Any chance this is on a public website we could get CP and (s)FTP/SSH access to? If so, could you send some credentials over to support@craftcms.com so we can look around?

@steveooo9
Copy link
Author

@angrybrad I will look into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants