Skip to content

Commit ea77c79

Browse files
compensate for drupal bootstrap returning bad email values due to inconsisitently using mail or email in user object close #186 (#187)
1 parent a8bdf75 commit ea77c79

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

CAJA_WS.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@
6868
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
6969

7070
$userid = intval($user->uid);
71-
$user_email = $user->email;
71+
if (isset($user->email))
72+
{
73+
$user_email = $user->email;
74+
} else {
75+
$user_email = $user->mail;
76+
}
7277
$canAuthor = in_array('a2j author', array_values($user->roles));
7378
} else {
7479
// Running locally, just use demo or devuser (26 ,45 for a2jauthor.org).

0 commit comments

Comments
 (0)