summaryrefslogtreecommitdiff
path: root/scripts/useremail.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-03-13 06:36:25 -0600
committerEvan Prodromou <evan@status.net>2010-03-13 06:36:25 -0600
commitc1e96cbdefa66e66815c421378b9452d7c8d5548 (patch)
treea08e80d705d08ffb33233991bf80e7c19867552a /scripts/useremail.php
parenta2cc26ba8a21aa3614ebfc4a77c0bec9ffb2655d (diff)
parent9e9ab23e1f936eb62014d8f7b0051f0314ae482c (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'scripts/useremail.php')
-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 {