summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEric Helgeson <erichelgeson@gmail.com>2010-01-16 17:42:53 -0500
committerEric Helgeson <erichelgeson@gmail.com>2010-01-16 17:42:53 -0500
commite3dc45d103666b090777a1304ca093ab8f45c803 (patch)
treedee4bf5e55894f3758c2706f826e9d2357676207 /scripts
parent9dc9c404cf5082ea769fb0c1d13c55742e046849 (diff)
parent1e8707d29a6cf58d8e706b1f47cf1b90b337f35e (diff)
Merge commit 'refs/merge-requests/117' of git://gitorious.org/statusnet/mainline into integration
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/useremail.php25
1 files changed, 23 insertions, 2 deletions
diff --git a/scripts/useremail.php b/scripts/useremail.php
index 6676a87c8..0a59d36f8 100755
--- a/scripts/useremail.php
+++ b/scripts/useremail.php
@@ -53,7 +53,17 @@ if (have_option('i', 'id')) {
if (!empty($user)) {
if (empty($user->email)) {
- print "No email registered for user '$user->nickname'\n";
+ # Check for unconfirmed emails
+ $unconfirmed_email = new Confirm_address();
+ $unconfirmed_email->user_id = $user->id;
+ $unconfirmed_email->address_type = 'email';
+ $unconfirmed_email->find(true);
+
+ if (empty($unconfirmed_email->address)) {
+ print "No email registered for user '$user->nickname'\n";
+ } else {
+ print "Unconfirmed Adress: $unconfirmed_email->address\n";
+ }
} else {
print "$user->email\n";
}
@@ -65,7 +75,18 @@ if (have_option('e', 'email')) {
$user->email = get_option_value('e', 'email');
$user->find(false);
if (!$user->fetch()) {
- print "No users with email $user->email\n";
+ # Check unconfirmed emails
+ $unconfirmed_email = new Confirm_address();
+ $unconfirmed_email->address = $user->email;
+ $unconfirmed_email->address_type = 'email';
+ $unconfirmed_email->find(true);
+
+ if (empty($unconfirmed_email->user_id)) {
+ print "No users with email $user->email\n";
+ } else {
+ $user=User::staticGet('id', $unconfirmed_email->user_id);
+ print "Unconfirmed Address: $user->id $user->nickname\n";
+ }
exit(0);
}
do {