#6 An administrator cannot manage unverified users

Good catch.  I've made a note on issue #42 to clean these up as it is
eerily similar.


On Thu, Jul 17, 2014 at 8:50 AM, Blake Callens <notifications@github.com>
wrote:

> In controllers/actions/admin/users/delete_unverified_user.js:
>
> > +    var dao = new pb.DAO();
> > +    dao.loadById(vars.id, 'unverified_user', function(err, user) {
> > +        if(user === null) {
> > +            self.formError(self.ls.get('ERROR_SAVING'), '/admin/users/unverified_users', cb);
> > +            return;
> > +        }
> > +
> > +        //delete the user
> > +        dao.deleteMatching({_id: ObjectID(vars.id)}, 'unverified_user').then(function(result) {
> > +            if(result < 1) {
> > +                self.formError(self.ls.get('ERROR_SAVING'), '/admin/users/unverified_users', cb);
> > +                return;
> > +            }
> > +
> > +            self.session.success = user.username + ' ' + self.ls.get('DELETED');
> > +            cb(pb.RequestHandler.generateRedirect(pb.config.siteRoot + '/admin/users/unverified_users'));
>
> This was copied out of the delete_user controller, so we should open a bug
> to go and clean these up throughout the platform.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pencilblue/pencilblue/pull/94/files#r15054657>.
>



-- 
Brian P. Hyder