Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
provision
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
provision
Commits
6d4dc69b
Commit
6d4dc69b
authored
Mar 28, 2019
by
llamech
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '3034235-use-alias-redirection-target' into 3036890-simplify-subdirs
parents
b441a70e
7211aca1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
13 deletions
+39
-13
platform/drupal/install_6.inc
platform/drupal/install_6.inc
+8
-2
platform/drupal/install_7.inc
platform/drupal/install_7.inc
+10
-4
platform/drupal/install_8.inc
platform/drupal/install_8.inc
+7
-2
platform/reset.login.provision.inc
platform/reset.login.provision.inc
+5
-5
provision.drush.inc
provision.drush.inc
+9
-0
No files found.
platform/drupal/install_6.inc
View file @
6d4dc69b
...
...
@@ -366,8 +366,14 @@ function install_main() {
$client_email
=
install_validate_client_email
(
drush_get_option
(
'client_email'
,
FALSE
));
$account
=
install_create_admin_user
(
$client_email
);
$onetime
=
user_pass_reset_url
(
$account
);
// Store the one time login link in an option so the front end can direct the user to their new site.
// If a redirect is defined, the symlink to the alias needs to exist before
// we generate the login link, below.
_provision_drupal_maintain_aliases
();
// Store the one time login link in an option so the front end can direct the
// user to their new site.
$onetime
=
provision_generate_login_reset
();
drush_set_option
(
'login_link'
,
$onetime
.
'/login'
);
drush_log
(
dt
(
'Login url: !onetime'
,
array
(
'!onetime'
=>
$onetime
.
'/login'
)),
'success'
);
...
...
platform/drupal/install_7.inc
View file @
6d4dc69b
...
...
@@ -158,10 +158,16 @@ function install_main() {
_provision_drupal_create_directories
();
$account
=
user_load
(
1
);
$onetime
=
user_pass_reset_url
(
$account
);
// Store the one time login link in an option so the front end can direct the user to their new site.
drush_set_option
(
'login_link'
,
$onetime
.
'/login'
);
drush_log
(
dt
(
'Login url: !onetime'
,
array
(
'!onetime'
=>
$onetime
.
'/login'
)),
'success'
);
// If a redirect is defined, the symlink to the alias needs to exist before
// we generate the login link, below.
_provision_drupal_maintain_aliases
();
// Store the one time login link in an option so the front end can direct the
// user to their new site.
$onetime
=
provision_generate_login_reset
();
drush_set_option
(
'login_link'
,
$onetime
);
drush_log
(
dt
(
'Login url: !onetime'
,
array
(
'!onetime'
=>
$onetime
)),
'success'
);
if
(
drush_get_option
(
'client_email'
,
FALSE
))
{
install_send_welcome_mail
(
$url
,
$account
,
$install_locale
,
$client_email
,
$onetime
);
...
...
platform/drupal/install_8.inc
View file @
6d4dc69b
...
...
@@ -159,8 +159,13 @@ function install_main() {
$account
=
user_load
(
1
);
$onetime
=
user_pass_reset_url
(
$account
);
// Store the one time login link in an option so the front end can direct the user to their new site.
// If a redirect is defined, the symlink to the alias needs to exist before
// we generate the login link, below.
_provision_drupal_maintain_aliases
();
// Store the one time login link in an option so the front end can direct the
// user to their new site.
$onetime
=
provision_generate_login_reset
();
drush_set_option
(
'login_link'
,
$onetime
);
drush_log
(
dt
(
'Login url: !onetime'
,
array
(
'!onetime'
=>
$onetime
)),
'message'
);
...
...
platform/reset.login.provision.inc
View file @
6d4dc69b
...
...
@@ -15,9 +15,9 @@
* Generate a one-time login reset url
*/
function
drush_provision_drupal_provision_login_reset
()
{
// pass the login link to the front end
drush_set_option
(
'browser'
,
FALSE
);
$onetime
=
drush_user_login
();
drush_set_option
(
'login_link'
,
$
onetime
);
drush_log
(
dt
(
'Login url: !onetime'
,
array
(
'!onetime'
=>
$
onetime
)),
'success'
);
$uri
=
d
()
->
redirection
?:
d
()
->
uri
;
$result
=
drush_invoke_process
(
d
()
->
name
,
'user-login'
,
array
(),
array
(
'uri'
=>
$uri
,
'no-browser'
=>
TRUE
)
);
drush_set_option
(
'login_link'
,
$
result
[
'output'
]
);
drush_log
(
dt
(
'Login url: !onetime'
,
array
(
'!onetime'
=>
$
result
[
'output'
]
)),
'success'
);
}
provision.drush.inc
View file @
6d4dc69b
...
...
@@ -491,3 +491,12 @@ function provision_hosting_feature_enabled($feature) {
return
array_key_exists
(
$feature
,
$features
)
&&
$features
[
$feature
];
}
/**
* Generate one-time login link
*/
function
provision_generate_login_reset
()
{
$uri
=
d
()
->
redirection
?:
d
()
->
uri
;
$result
=
drush_invoke_process
(
d
()
->
name
,
'user-login'
,
array
(),
array
(
'uri'
=>
$uri
,
'no-browser'
=>
TRUE
));
return
$result
[
'output'
];
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment