Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
643 additions
and
433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/** | ||
* Bulk delete users | ||
*/ | ||
|
||
$user_guids = (array) get_input('user_guids'); | ||
if (empty($user_guids)) { | ||
return elgg_error_response(elgg_echo('error:missing_data')); | ||
} | ||
|
||
$hidden = access_show_hidden_entities(true); | ||
|
||
foreach ($user_guids as $user_guid) { | ||
$user = get_user($user_guid); | ||
if (empty($user)) { | ||
continue; | ||
} | ||
|
||
$name = $user->getDisplayName(); | ||
if ($user->delete()) { | ||
system_message(elgg_echo('admin:user:delete:yes', [$name])); | ||
} else { | ||
register_error(elgg_echo('entity:delete:fail', [$name])); | ||
} | ||
} | ||
|
||
access_show_hidden_entities($hidden); | ||
|
||
return elgg_ok_response(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* Bulk validate users | ||
*/ | ||
|
||
$user_guids = (array) get_input('user_guids'); | ||
if (empty($user_guids)) { | ||
return elgg_error_response(elgg_echo('error:missing_data')); | ||
} | ||
|
||
$hidden = access_show_hidden_entities(true); | ||
|
||
foreach ($user_guids as $user_guid) { | ||
$user = get_user($user_guid); | ||
if (empty($user)) { | ||
continue; | ||
} | ||
|
||
if ($user->isValidated()) { | ||
continue; | ||
} | ||
|
||
$user->setValidationStatus(true, 'manual'); | ||
|
||
if (!$user->isValidated()) { | ||
register_error(elgg_echo('action:user:validate:error', [$user->getDisplayName()])); | ||
continue; | ||
} | ||
|
||
system_message(elgg_echo('action:user:validate:success', [$user->getDisplayName()])); | ||
} | ||
|
||
access_show_hidden_entities($hidden); | ||
|
||
return elgg_ok_response(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* Validate a user | ||
*/ | ||
|
||
$user_guid = (int) get_input('user_guid'); | ||
if (empty($user_guid)) { | ||
return elgg_error_response(elgg_echo('error:missing_data')); | ||
} | ||
|
||
$hidden = access_show_hidden_entities(true); | ||
|
||
$user = get_user($user_guid); | ||
if (empty($user)) { | ||
access_show_hidden_entities($hidden); | ||
|
||
return elgg_error_response(elgg_echo('error:missing_data')); | ||
} | ||
|
||
if ($user->isValidated()) { | ||
// already validated | ||
access_show_hidden_entities($hidden); | ||
|
||
return elgg_ok_response('', elgg_echo('action:user:validate:already', [$user->getDisplayName()])); | ||
} | ||
|
||
$user->setValidationStatus(true, 'manual'); | ||
|
||
if (!$user->isValidated()) { | ||
access_show_hidden_entities($hidden); | ||
|
||
return elgg_error_response(elgg_echo('action:user:validate:error', [$user->getDisplayName()])); | ||
} | ||
|
||
access_show_hidden_entities($hidden); | ||
|
||
return elgg_ok_response('', elgg_echo('action:user:validate:success', [$user->getDisplayName()])); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
User validation by e-mail | ||
========================= | ||
|
||
The uservalidationbyemail plugin adds a step to the user registration process. After the user registered on the site, an e-mail is sent to their | ||
e-mail address in order to validate that the e-mail address belongs to the user. In the e-mail is an verification link, only after the user clicked | ||
on the link will the account of the user be able to login to the site. | ||
|
||
The process for the user | ||
------------------------ | ||
|
||
1. The user creates an account by going to the registration page of your site | ||
2. After the account is created the user lands on a page with instructions to check their e-mail account for the validation e-mail | ||
3. In the validation e-mail is a link to confirm their e-mail address | ||
4. After clicking on the link, the account is validated | ||
5. If possible the user gets logged in | ||
|
||
If the user tries to login before validating their account an error is shown to indicate that the user needs to check their e-mail account. Also the | ||
validation e-mail is sent again. | ||
|
||
Options for site administrators | ||
------------------------------- | ||
|
||
A site administrator can take some actions on unvalidated accounts. Under Administration -> Users -> Unvalidated is a list of unvalidated users. | ||
The administrator can manualy validate or delete the user. Also the option to resend the validation e-mail is present. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.