title: AngularFire: Getting the ID of Users Data from email in SimpleLogin
body: <p>I'm trying to implement some simple using registration using Firebase through AngularFire and Angular.js. I'm using the SimpleLogin tool to manage the users. I can create users just fine.</p>
  
  <pre><code>  var firebaseRef = new Firebase(FIREBASE_URL);
    var simpleLogin = $firebaseSimpleLogin(firebaseRef);
  
    var firebaseUsersRef = new Firebase(FIREBASE_URL + 'users');
    var firebaseUsers = $firebase(firebaseUsersRef);
  
    var myObject = {
  
      register: function(user) {
        var myDate = new Date().getTime();
  
        return simpleLogin.$createUser(
          user.email, user.password)
          .then(function(regUser) {
              var userInfo = {
                  date: myDate,
                  md5: regUser.md5_hash,
                  firstname: user.firstname,
                  lastname: user.lastname,
                  email: user.email
                }
              firebaseUsers.$push(userInfo).then(function(ref) {
                userInfo.uid = ref.name();
                $rootScope.currentUser = userInfo;
              });
          }); //push user
      }, //register
  </code></pre>
  
  <p>Works like a charm. In order to get at this information when the user logs in, I've tried implementing an event handler on the $rootscope. I would like it to search through the uid that I stored and then get me record with the right user information.</p>
  
  <pre><code>$rootScope.$on('$firebaseSimpleLogin:login', function (e, authUser) {
    var query = $firebase(firebaseRef.startAt(authUser.uid).endAt(authUser.uid));
    console.log(query);
    $location.path('/meetings');
  });
  </code></pre>
  
  <p>In order to use startAt and endAt, do I have to establish $priority. When I try, I get an error stating that I can't have any special characters. So that never works. I don't really care about how this data stored, I just want to get the index of the data so that I can retrieve the right user.</p>