Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16399

ezmbpaex : Not able to send notification emails

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 4.3.0rc1, QA tracked issues
    • 4.3.0beta2
    • None
    • Operating System:
      PHP Version: (please be specific, like '4.4.3' or '5.1.5')
      Database and version:
      Browser (and version):
      mail transport : SMTP

    Description

      Hi

      The ezmbpaex does not seem to be able to send notifications about passwords which are about to expire

      This is the output when running the cronjob

      Running cronjob part 'ezmbpaex_send_expiry_notifications'
      Running extension/ezmbpaex/cronjobs/ezmbpaex_sendexpirynotifications.php at:
      10/03/2010 12:06 pm
      eZPaEx: Send expiry notifications process start
      Found 7 objects pending notification, send notifications:
      Error user_object disabled or not found. UserID: 4
      Error sending notification. UserID: 10
      Error user_object disabled or not found. UserID: 11
      Error user_object disabled or not found. UserID: 12
      Error user_object disabled or not found. UserID: 13
      Error user_object disabled or not found. UserID: 42
      Error sending notification. UserID: 57
      Sent 0 notifications.
      
      eZPaEx: Send expiry notifications process end
      
      Completing extension/ezmbpaex/cronjobs/ezmbpaex_sendexpirynotifications.php
      at: 10/03/2010 12:06 pm
      

      As you can see, it wanted to send notification to userID 57, but it failed for some reasons (var/log/error.log doesn't say anything)

      Maybe caused be move to ezcMail ?

      Steps to reproduce
      Setup
         1. Install ezpublish and ezmbpaex extension
         2. Set DefaultPasswordLifeTime=3 in inifile before adding password expiry type to user and usergroup classes (as specified in installation guide)
      
      
      Register new user
         1. Go to plain site
         2. Click "login" in top menu
         3. Click "Sign up" button
         4. Register new user:
            First name : te
            Last name : st
            Username : test
            Password : test1
            Confirm password : test1
            Email : [whatever email address tester has access to]
         5. Click "Register" button
         6. Verify that you get a "account was successfully created" message
         7. Click "OK" button
         8. Wait for confirmation email
         9. Access the activation URL received in the email
        10. Validate that you get message that account has been activated
        11. Click "OK" button
        12. Click "Logout" in top menu
      
      Log in
         1. Click "Login" in top menu
         2. Provide login data:
            Username : test
            Password : test1
         3. Click "Login" button
         4. Verify that you get to "Change password for user" page
         5. Enter form data:
            Old password : test1
            New password : test2
            Retype password : test2
         6. Click "OK" button
         7. Verify that you get a "Password successfully updated" message
         8. Click "Frontpage" in top menu
         9. Click "Login" in top menu
        10. Provide login data:
            Username : test
            Password : test2
        11. Click "Login" button
        12. Verify that you are logged in ( Top menu has a "Logout" link )
        13. Click "Logout" in top menu
      
      Test notifiaction
      In order to skip waiting for password expiration, we'll manipulate the database a bit using mysql SQL commands
         1. On the command line, go to the test instance ( .run/ directory )
         2. $ php runcronjobs.php send_expiry_notifications
         3. You'll get error messages like "Error user_object disabled or not found. UserID: 4". Ignore these errors (ref bug #015404 )
         4. mysql> update ezx_mbpaex set password_last_updated=unix_timestamp(now())-86500 where contentobject_id > 45;
            (FYI : 86500 is 1day+)
         5. $ php runcronjobs.php send_expiry_notifications
         6. Verify that you get "Sent 1 notifications."
         7. Check email account and verify that you receive the notification
      

      When running step #5 above, you'll get the "Error sending notification. UserID: 57" as described.

      FYI : Below is the rest of the test case as well (blocked and not tested yet)

      Verify that you can still login
         1. Go to plain site
         2. Click "login" in top menu
         3. Log in with test/test2
         4. Verify that you are able to log in
         5. Click "Logout" in top menu
      
      Expire the user
         1. On the command line, go to the test instance ( .run/ directory )
         2. mysql> update ezx_mbpaex set password_last_updated=unix_timestamp(now())-260000 where contentobject_id > 45;
            (FYI : 260000 is 3day+)
      
      Verify that user password has expired
         1. Go to plain site
         2. Click "login" in top menu
         3. Log in with test/test2
         4. Verify that you are sent to "Change password for user" page
         5. Enter form data:
            Old password : test2
            New password : test1
            Retype passwprd : test1
         6. Verify that you get a "Password successfully updated." message
      
      Log in again with new password
         1. Click "Login" in top menu
         2. Log in with test/test1
         3. Verify that you are logged in successfully
         4. Click "Logout" in top menu
      

      Attachments

        Activity

          People

            als als
            vl vl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: